diff options
author | joeydelarago <joeydelarago@gmail.com> | 2022-08-24 15:33:04 +0300 |
---|---|---|
committer | joeydelarago <joeydelarago@gmail.com> | 2022-08-24 15:33:04 +0300 |
commit | 04580b8fdc2fc8acaf75f0c8d02c37759cafc631 (patch) | |
tree | da86aaca732b0fb09b479d2c949a0a9c6ce8e4c6 | |
parent | 2013ad6baf7d77601087b6dcc6ba35c9e7f4f6cc (diff) |
Simplify logic by having abstract printers always be online.
CURA-9221
-rw-r--r-- | cura/Machines/Models/MachineListModel.py | 6 | ||||
-rw-r--r-- | cura/Settings/CuraStackBuilder.py | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py index 716238efc4..f3781cfd60 100644 --- a/cura/Machines/Models/MachineListModel.py +++ b/cura/Machines/Models/MachineListModel.py @@ -83,14 +83,10 @@ class MachineListModel(ListModel): if parseBool(container_stack.getMetaDataEntry("hidden", False)): return - is_online = parseBool(container_stack.getMetaDataEntry("is_online", False)) - if container_stack.getMetaDataEntry("type") == "abstract_machine": - is_online = True - self.appendItem({"name": container_stack.getName(), "id": container_stack.getId(), "metadata": container_stack.getMetaData().copy(), - "isOnline": is_online, + "isOnline": parseBool(container_stack.getMetaDataEntry("is_online", False)), "machineType": container_stack.getMetaDataEntry("type"), "machineCount": machine_count, }) diff --git a/cura/Settings/CuraStackBuilder.py b/cura/Settings/CuraStackBuilder.py index 7eff275457..d711a61243 100644 --- a/cura/Settings/CuraStackBuilder.py +++ b/cura/Settings/CuraStackBuilder.py @@ -297,6 +297,7 @@ class CuraStackBuilder: name = machine_definition.getName() stack = AbstractMachine(abstract_machine_id) + stack.setMetaDataEntry("is_online", True) stack.setDefinition(machine_definition) cls.createUserContainer( name, |