diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index 5c05d28739..df881b4714 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -212,7 +212,7 @@ class GlobalStack(CuraContainerStack): # Determine whether or not we should try to get the "resolve" property instead of the # requested property. def _shouldResolve(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> bool: - if property_name is not "value": + if property_name != "value": # Do not try to resolve anything but the "value" property return False diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index b653f1a73b..42ece4043d 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -65,6 +65,7 @@ Item { id: description text: details.description || "" + font: UM.Theme.getFont("default") anchors { top: title.bottom diff --git a/plugins/Toolbox/src/AuthorsModel.py b/plugins/Toolbox/src/AuthorsModel.py index 877f8256ee..7bfc58df04 100644 --- a/plugins/Toolbox/src/AuthorsModel.py +++ b/plugins/Toolbox/src/AuthorsModel.py @@ -53,7 +53,7 @@ class AuthorsModel(ListModel): # Filter on all the key-word arguments. for key, value in self._filter.items(): - if key is "package_types": + if key == "package_types": key_filter = lambda item, value = value: value in item["package_types"] # type: ignore elif "*" in value: key_filter = lambda item, key = key, value = value: self._matchRegExp(item, key, value) # type: ignore diff --git a/plugins/Toolbox/src/PackagesModel.py b/plugins/Toolbox/src/PackagesModel.py index d94fdf6bb7..1cf87790bc 100644 --- a/plugins/Toolbox/src/PackagesModel.py +++ b/plugins/Toolbox/src/PackagesModel.py @@ -112,7 +112,7 @@ class PackagesModel(ListModel): # Filter on all the key-word arguments. for key, value in self._filter.items(): - if key is "tags": + if key == "tags": key_filter = lambda item, v = value: v in item["tags"] elif "*" in value: key_filter = lambda candidate, k = key, v = value: self._matchRegExp(candidate, k, v) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 085c5d1bde..6d21b8e6f0 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -613,12 +613,12 @@ class Toolbox(QObject, Extension): self._server_response_data[response_type] = json_data["data"] self._models[response_type].setMetadata(self._server_response_data[response_type]) - if response_type is "packages": + if response_type == "packages": self._models[response_type].setFilter({"type": "plugin"}) self.reBuildMaterialsModels() self.reBuildPluginsModels() self._notifyPackageManager() - elif response_type is "authors": + elif response_type == "authors": self._models[response_type].setFilter({"package_types": "material"}) self._models[response_type].setFilter({"tags": "generic"}) diff --git a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py index 8d923d3827..0c205b7b3c 100644 --- a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py @@ -27,6 +27,7 @@ from UM.Version import Version from . import ClusterUM3OutputDevice, LegacyUM3OutputDevice from .Cloud.CloudOutputDeviceManager import CloudOutputDeviceManager +from .Cloud.CloudOutputDevice import CloudOutputDevice # typing if TYPE_CHECKING: from PyQt5.QtNetwork import QNetworkReply @@ -181,7 +182,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): um_network_key = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("um_network_key") if key == um_network_key: self.getOutputDeviceManager().addOutputDevice(self._discovered_devices[key]) - self.checkCloudFlowIsPossible() + self.checkCloudFlowIsPossible(None) else: self.getOutputDeviceManager().removeOutputDevice(key) if key.startswith("manual:"): @@ -488,7 +489,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): return True ## Check if the prerequsites are in place to start the cloud flow - def checkCloudFlowIsPossible(self) -> None: + def checkCloudFlowIsPossible(self, cluster: Optional[CloudOutputDevice]) -> None: Logger.log("d", "Checking if cloud connection is possible...") # Pre-Check: Skip if active machine already has been cloud connected or you said don't ask again @@ -595,7 +596,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): self._cloud_flow_complete_message.hide() # Check for cloud flow again with newly selected machine - self.checkCloudFlowIsPossible() + self.checkCloudFlowIsPossible(None) def _createCloudFlowStartMessage(self): self._start_cloud_flow_message = Message( diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 708606f483..c60d4d48f0 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -205,7 +205,7 @@ Item Row { - height: visible ? childrenRect.height : 0 + height: visible ? UM.Theme.getSize("setting_control").height : 0 visible: extrudersModel.count > 1 // If there is only one extruder, there is no point to enable/disable that. Label @@ -223,7 +223,7 @@ Item { checked: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.isEnabled : false enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder. - height: UM.Theme.getSize("setting_control").height + height: parent.height style: UM.Theme.styles.checkbox /* Use a MouseArea to process the click on this checkbox. @@ -242,7 +242,7 @@ Item Row { - height: visible ? childrenRect.height: 0 + height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0 visible: Cura.MachineManager.hasMaterials Label @@ -267,7 +267,7 @@ Item tooltip: text width: selectors.controlWidth - height: UM.Theme.getSize("print_setup_big_item").height + height: parent.height style: UM.Theme.styles.print_setup_header_button activeFocusOnPress: true @@ -302,7 +302,7 @@ Item Row { - height: visible ? childrenRect.height: 0 + height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0 visible: Cura.MachineManager.hasVariants Label @@ -321,7 +321,7 @@ Item id: variantSelection text: Cura.MachineManager.activeVariantName tooltip: Cura.MachineManager.activeVariantName - height: UM.Theme.getSize("print_setup_big_item").height + height: parent.height width: selectors.controlWidth style: UM.Theme.styles.print_setup_header_button activeFocusOnPress: true; diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 7e115667c3..ed075c6b90 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -133,7 +133,14 @@ Item supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color } } - onCurrentIndexChanged: supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color + onCurrentIndexChanged: + { + var maybeColor = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color + if(maybeColor) + { + supportExtruderCombobox.color = maybeColor + } + } Binding {