mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
T466: Added hiding of properties menu
This commit is contained in:
parent
d7b4296cfc
commit
2ee5e2cb0b
3 changed files with 27 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue