Skip to content

Commit baafc16

Browse files
committed
Hide non-belt machines in this build.
Don't merge to main. CURA-12625 CURA-12883
1 parent ec163d1 commit baafc16

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

cura/Machines/Models/DiscoveredPrintersModel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ def discoveredPrinters(self) -> List["DiscoveredPrinter"]:
222222
available_list = []
223223
not_available_list = []
224224
for item in item_list:
225+
if "belt" not in item.machineType:
226+
continue
225227
if item.isUnknownMachineType or getattr(item.device, "clusterSize", 1) < 1:
226228
not_available_list.append(item)
227229
else:

cura/Machines/Models/GlobalStacksModel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ def _update(self) -> None:
148148
if self._filter_online_only and not is_online:
149149
continue
150150

151+
typ = container_stack.getMetaDataEntry("type", "")
152+
if typ == "machine" and "belt" not in container_stack.getContainer(7).getId():
153+
continue
154+
151155
is_abstract_machine = parseBool(container_stack.getMetaDataEntry("is_abstract_machine", False))
152156
if self._filter_abstract_machines is not None and self._filter_abstract_machines is not is_abstract_machine:
153157
continue

cura/Machines/Models/MachineListModel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ def _update(self) -> None:
110110

111111
for abstract_machine in abstract_machine_stacks:
112112
definition_id = abstract_machine.definition.getId()
113+
114+
if "belt" not in definition_id:
115+
continue
116+
113117
connected_machine_stacks = machines_manager.getMachinesWithDefinition(definition_id, online_only = False)
114118

115119
connected_machine_stacks = list(filter(lambda machine: machine.hasNetworkedConnection(), connected_machine_stacks))
@@ -142,6 +146,9 @@ def _update(self) -> None:
142146
})
143147

144148
for stack in other_machine_stacks:
149+
if "belt" not in stack.getContainer(7).getId():
150+
continue
151+
145152
self.addItem(stack, False)
146153

147154
def addItem(self, container_stack: ContainerStack, is_online: bool, machine_count: int = 0) -> None:

resources/qml/Settings/SettingView.qml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,6 @@ Item
379379
}
380380
}
381381
}
382-
function onSetScrollPositionChangeLoseFocus(lose_focus)
383-
{
384-
loseFocusOnScrollPositionChange = lose_focus;
385-
}
386382
}
387383
}
388384

0 commit comments

Comments
 (0)