diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index ee5fdfea2a..c5db2b01e7 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1007,3 +1007,18 @@ class CuraApplication(QtApplication): @pyqtSlot(str) def log(self, msg): Logger.log("d", msg) + + _hide_settings = False + + HideSettingsChanged = pyqtSignal(bool) + + @pyqtSlot(bool) + def setHideSettings(self, hide): + self._hide_settings = hide + self.HideSettingsChanged.emit(hide) + + @pyqtProperty(bool, notify=HideSettingsChanged) + def hideSettings(self): + return self._hide_settings + + diff --git a/plugins/GCODEReader/GCODEReader.py b/plugins/GCODEReader/GCODEReader.py index 5769959983..8305061a59 100644 --- a/plugins/GCODEReader/GCODEReader.py +++ b/plugins/GCODEReader/GCODEReader.py @@ -71,10 +71,14 @@ class GCODEReader(MeshReader): # Preferences.getInstance().setValue("cura/jobname_prefix", True) backend = Application.getInstance().getBackend() backend._pauseSlicing = False + Application.getInstance().setHideSettings(False) + #Application.getInstance().getPrintInformation()._setAbbreviatedMachineName() else: backend = Application.getInstance().getBackend() backend._pauseSlicing = True backend.backendStateChange.emit(1) + Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced" + Application.getInstance().setHideSettings(True) def read(self, file_name): scene_node = None @@ -213,6 +217,8 @@ class GCODEReader(MeshReader): decorator.setLayerData(layer_mesh) scene_node.addDecorator(decorator) + Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced" + scene_node_parent = Application.getInstance().getBuildVolume() scene_node.setParent(scene_node_parent) @@ -230,10 +236,11 @@ class GCODEReader(MeshReader): # scene_node.setMeshData(mesh_builder.build()) # scene_node.setMeshData(MeshData(file_name=file_name)) - Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced" + Preferences.getInstance().setValue("cura/jobname_prefix", True) + view = Application.getInstance().getController().getActiveView() if view.getPluginId() == "LayerView": view.resetLayerData() diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index d97b69e801..234e139791 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -16,6 +16,7 @@ Rectangle property int currentModeIndex; property bool monitoringPrint: false + property bool hideSettings: Printer.hideSettings Connections { target: Printer @@ -296,7 +297,7 @@ Rectangle width: parent.width * 0.45 - 2 * UM.Theme.getSize("default_margin").width font: UM.Theme.getFont("large") color: UM.Theme.getColor("text") - visible: !monitoringPrint + visible: !monitoringPrint && !hideSettings elide: Text.ElideRight } @@ -308,7 +309,7 @@ Rectangle anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.top: headerSeparator.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - visible: !monitoringPrint + visible: !monitoringPrint && !hideSettings Component{ id: wizardDelegate Button { @@ -432,7 +433,7 @@ Rectangle anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: base.left anchors.right: base.right - visible: !monitoringPrint + visible: !monitoringPrint && !hideSettings delegate: StackViewDelegate {