Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-10-15 17:24:43 +0300
committerGhostkeeper <rubend@tutanota.com>2021-10-15 17:24:43 +0300
commit0378531f13b989c6fe4bc22e2fbc14cce55c1dab (patch)
treec4f5440bc03fee8c95c43fbc66992d922224b602 /cura/Machines
parent0583814dfa053b62ea51d642a0704cb74029ca94 (diff)
Handle QML exposing of filterConnectionType if not filtering
It should expose it as -1 then. Contributes to issue CURA-8609.
Diffstat (limited to 'cura/Machines')
-rw-r--r--cura/Machines/Models/GlobalStacksModel.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cura/Machines/Models/GlobalStacksModel.py b/cura/Machines/Models/GlobalStacksModel.py
index cfe8c7587a..586bd11819 100644
--- a/cura/Machines/Models/GlobalStacksModel.py
+++ b/cura/Machines/Models/GlobalStacksModel.py
@@ -61,7 +61,9 @@ class GlobalStacksModel(ListModel):
Only printers that match this connection type will be listed in the
model.
"""
- return int(self._filter_connection_type)
+ if self._filter_connection_type is None:
+ return -1
+ return self._filter_connection_type.value
filterOnlineOnlyChanged = pyqtSignal()
def setFilterOnlineOnly(self, new_filter: bool) -> None: