diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index da71f6920e..1aae97942a 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -60,13 +60,11 @@ class ConvexHullDecorator(SceneNodeDecorator): previous_node = self._node # Disconnect from previous node signals if previous_node is not None and node is not previous_node: - previous_node.transformationChanged.disconnect(self._onChanged) - previous_node.parentChanged.disconnect(self._onChanged) + previous_node.boundingBoxChanged.disconnect(self._onChanged) super().setNode(node) - # Mypy doesn't understand that self._node is no longer optional, so just use the node. - node.transformationChanged.connect(self._onChanged) - node.parentChanged.connect(self._onChanged) + + node.boundingBoxChanged.connect(self._onChanged) self._onChanged() diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 736cb06d49..69978ae69f 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -362,7 +362,6 @@ class MachineManager(QObject): # Mark global stack as invalid ConfigurationErrorMessage.getInstance().addFaultyContainers(global_stack.getId()) return # We're done here - ExtruderManager.getInstance().setActiveExtruderIndex(0) # Switch to first extruder self._global_container_stack = global_stack self._application.setGlobalContainerStack(global_stack) @@ -370,6 +369,11 @@ class MachineManager(QObject): self._initMachineState(global_stack) self._onGlobalContainerChanged() + # Switch to the first enabled extruder + self.updateDefaultExtruder() + default_extruder_position = int(self.defaultExtruderPosition) + ExtruderManager.getInstance().setActiveExtruderIndex(default_extruder_position) + self.__emitChangedSignals() ## Given a definition id, return the machine with this id. diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 8c63e1ef1a..aa4893b3b9 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -140,7 +140,7 @@ Item { id: printerConfiguration anchors.verticalCenter: parent.verticalCenter - buildplate: printer ? "Glass" : null // 'Glass' as a default + buildplate: printer ? catalog.i18nc("@label", "Glass") : null // 'Glass' as a default configurations: { var configs = [] diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 0c195e9017..667a969e87 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -371,10 +371,17 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._sendCommand("N%d%s*%d" % (self._gcode_position, line, checksum)) - progress = (self._gcode_position / len(self._gcode)) + print_job = self._printers[0].activePrintJob + try: + progress = self._gcode_position / len(self._gcode) + except ZeroDivisionError: + # There is nothing to send! + if print_job is not None: + print_job.updateState("error") + return elapsed_time = int(time() - self._print_start_time) - print_job = self._printers[0].activePrintJob + if print_job is None: controller = GenericOutputController(self) controller.setCanUpdateFirmware(True) diff --git a/resources/qml/Widgets/NotificationIcon.qml b/resources/qml/Widgets/NotificationIcon.qml index d06d9f16be..5cf4d17777 100644 --- a/resources/qml/Widgets/NotificationIcon.qml +++ b/resources/qml/Widgets/NotificationIcon.qml @@ -25,12 +25,16 @@ Rectangle Label { id: notificationLabel - anchors.centerIn: parent anchors.fill: parent color: UM.Theme.getColor("primary_text") horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("small") + font: UM.Theme.getFont("default") renderType: Text.NativeRendering + + // This is a bit of a hack, but we don't really have enough room for 2 characters (eg 9+). The default font + // does have a tad bit to much spacing. So instead of adding a whole new font, we just modify it a bit for this + // specific instance. + Component.onCompleted: font.letterSpacing = -1 } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index f287e60310..4b2f92e6e5 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -604,7 +604,7 @@ "toolbox_action_button": [8.0, 2.5], "toolbox_loader": [2.0, 2.0], - "notification_icon": [1.4, 1.4], + "notification_icon": [1.5, 1.5], "avatar_image": [6.8, 6.8],