diff options
author | joeydelarago <joeydelarago@gmail.com> | 2022-08-31 11:50:20 +0300 |
---|---|---|
committer | joeydelarago <joeydelarago@gmail.com> | 2022-08-31 11:50:20 +0300 |
commit | 19835844bfb44278afa9683c06c1f9401a1513af (patch) | |
tree | fed2f676c855d059c87d875e88e132f9de8eb65c /cura | |
parent | f94bbb9ebc91c9ffa9e461befb4c1a42780d82d9 (diff) |
Change listType -> componentType. Makes it a bit more clear that this variable decides which component should be used for the model.
CURA-9514
Diffstat (limited to 'cura')
-rw-r--r-- | cura/Machines/Models/MachineListModel.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cura/Machines/Models/MachineListModel.py b/cura/Machines/Models/MachineListModel.py index 10bc2d13c9..a429418e09 100644 --- a/cura/Machines/Models/MachineListModel.py +++ b/cura/Machines/Models/MachineListModel.py @@ -25,7 +25,7 @@ class MachineListModel(ListModel): IsOnlineRole = Qt.ItemDataRole.UserRole + 5 MachineCountRole = Qt.ItemDataRole.UserRole + 6 IsAbstractMachineRole = Qt.ItemDataRole.UserRole + 7 - ListTypeRole = Qt.ItemDataRole.UserRole + 8 + ComponentTypeRole = Qt.ItemDataRole.UserRole + 8 def __init__(self, parent=None) -> None: super().__init__(parent) @@ -41,7 +41,7 @@ class MachineListModel(ListModel): self.addRoleName(self.IsOnlineRole, "isOnline") self.addRoleName(self.MachineCountRole, "machineCount") self.addRoleName(self.IsAbstractMachineRole, "isAbstractMachine") - self.addRoleName(self.ListTypeRole, "listType") + self.addRoleName(self.ComponentTypeRole, "componentType") self._change_timer = QTimer() self._change_timer.setInterval(200) @@ -103,13 +103,13 @@ class MachineListModel(ListModel): if len(abstract_machine_stacks) > 0: if self._show_cloud_printers: - self.appendItem({"listType": "HIDE_BUTTON", + self.appendItem({"componentType": "HIDE_BUTTON", "isOnline": True, "isAbstractMachine": False, "machineCount": 0 }) else: - self.appendItem({"listType": "SHOW_BUTTON", + self.appendItem({"componentType": "SHOW_BUTTON", "isOnline": True, "isAbstractMachine": False, "machineCount": 0 @@ -130,7 +130,7 @@ class MachineListModel(ListModel): has_connection |= connection_type in container_stack.configuredConnectionTypes self.appendItem({ - "listType": "MACHINE", + "componentType": "MACHINE", "name": container_stack.getName(), "id": container_stack.getId(), "metadata": container_stack.getMetaData().copy(), |