diff --git a/plugins/3MFReader/WorkspaceDialog.py b/plugins/3MFReader/WorkspaceDialog.py index 7c803486eb..349dec177b 100644 --- a/plugins/3MFReader/WorkspaceDialog.py +++ b/plugins/3MFReader/WorkspaceDialog.py @@ -272,12 +272,18 @@ class WorkspaceDialog(QObject): def notifyClosed(self): self._result = {} # The result should be cleared before hide, because after it is released the main thread lock self._visible = False - self._lock.release() + try: + self._lock.release() + except: + pass def hide(self): self._visible = False self._view.hide() - self._lock.release() + try: + self._lock.release() + except: + pass @pyqtSlot() def onOkButtonClicked(self): @@ -290,7 +296,6 @@ class WorkspaceDialog(QObject): self._view.hide() self.hide() - ## Block thread until the dialog is closed. def waitForClose(self): if self._visible: diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index e9ef14dfa5..b1ece2be96 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -10,10 +10,11 @@ import UM 1.1 as UM UM.Dialog { + id: base title: catalog.i18nc("@title:window", "Open Project") minimumWidth: 500 * screenScaleFactor - minimumHeight: 400 * screenScaleFactor + minimumHeight: 450 * screenScaleFactor width: minimumWidth height: minimumHeight @@ -30,6 +31,7 @@ UM.Dialog materialResolveComboBox.currentIndex = 0 } } + Item { anchors.fill: parent @@ -377,7 +379,7 @@ UM.Dialog anchors.right: ok_button.left anchors.rightMargin: 2 * screenScaleFactor } - Button + Button { id: ok_button text: catalog.i18nc("@action:button","Open"); @@ -386,4 +388,10 @@ UM.Dialog anchors.right: parent.right } } + + function reject() { + manager.onCancelButtonClicked(); + base.visible = false; + base.rejected(); + } } diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c89f476fa9..914aa1dee0 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -441,7 +441,7 @@ class CuraEngineBackend(QObject, Backend): def _onStackErrorCheckFinished(self): self._is_error_check_scheduled = False - if self._need_slicing: + if not self._slicing and self._need_slicing: self.needsSlicing() self._onChanged() @@ -536,7 +536,6 @@ class CuraEngineBackend(QObject, Backend): # # \param message The protobuf message containing the print time per feature def _parseMessagePrintTimes(self, message): - result = { "inset_0": message.time_inset_0, "inset_x": message.time_inset_x, diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index 613a28f3b7..cd7738da11 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -247,7 +247,7 @@ Cura.MachineAction Row { - spacing: UM.Theme.getSize("default_margin").width + spacing: UM.Theme.getSize("default_margin").width * 4 / 5 Label { @@ -648,7 +648,7 @@ Cura.MachineAction Row { - spacing: UM.Theme.getSize("default_margin").width + spacing: UM.Theme.getSize("default_margin").width * 4 / 5 Label { diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml index b9b85ef2d4..7594d1691d 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml @@ -321,7 +321,7 @@ Cura.MachineAction title: catalog.i18nc("@title:window", "Printer Address") minimumWidth: 400 * screenScaleFactor - minimumHeight: 120 * screenScaleFactor + minimumHeight: 130 * screenScaleFactor width: minimumWidth height: minimumHeight diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 0b607c25f5..a389b7d2f9 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -23,10 +23,8 @@ from PyQt5.QtWidgets import QMessageBox import json import os import gzip -import zlib from time import time -from time import sleep i18n_catalog = i18nCatalog("cura") @@ -842,6 +840,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): Logger.log("d", "User aborted sending print to remote.") self._progress_message.hide() self._compressing_print = False + self._write_finished = True # post_reply does not always exist, so make sure we unblock writing if self._post_reply: self._finalizePostReply() Application.getInstance().showPrintMonitor.emit(False) @@ -1183,6 +1182,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): # Remove cached post request items. del self._material_post_objects[id(reply)] elif "print_job" in reply_url: + self._onUploadFinished() # Make sure the upload flag is reset as reply.finished is not always triggered try: reply.uploadProgress.disconnect(self._onUploadProgress) except: diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml index da5ebc7e37..25be77bd7d 100644 --- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml @@ -189,7 +189,7 @@ Rectangle PrintCoreConfiguration { id: leftExtruderInfo - width: (parent.width - extruderSeperator.width) / 2 + width: Math.floor((parent.width - extruderSeperator.width) / 2) printCoreConfiguration: printer.configuration[0] } @@ -204,7 +204,7 @@ Rectangle PrintCoreConfiguration { id: rightExtruderInfo - width: (parent.width - extruderSeperator.width) / 2 + width: Math.floor((parent.width - extruderSeperator.width) / 2) printCoreConfiguration: printer.configuration[1] } } @@ -404,6 +404,8 @@ Rectangle anchors.left: parent.left anchors.right: parent.right elide: Text.ElideRight + wrapMode: Text.Wrap + font: UM.Theme.getFont("default") } diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index c1750b2342..b13ce1aadf 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -16,8 +16,8 @@ TabView property bool editingEnabled: false; property string currency: UM.Preferences.getValue("cura/currency") ? UM.Preferences.getValue("cura/currency") : "€" - property real firstColumnWidth: (width * 0.45) | 0 - property real secondColumnWidth: (width * 0.45) | 0 + property real firstColumnWidth: (width * 0.50) | 0 + property real secondColumnWidth: (width * 0.40) | 0 property string containerId: "" property var materialPreferenceValues: UM.Preferences.getValue("cura/material_settings") ? JSON.parse(UM.Preferences.getValue("cura/material_settings")) : {}