mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Fix sidebar loading and unloading depending on active stage
This commit is contained in:
parent
2d044a37ae
commit
ee643610e5
7 changed files with 601 additions and 603 deletions
|
|
@ -9,14 +9,13 @@ from cura.Stages.CuraStage import CuraStage
|
|||
## Stage for monitoring a 3D printing while it's printing.
|
||||
class MonitorStage(CuraStage):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, parent = None):
|
||||
super().__init__(parent)
|
||||
Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
|
||||
# TODO: connect output device state to icon source
|
||||
|
||||
def _engineCreated(self):
|
||||
# Note: currently the sidebar component for prepare and monitor stages is the same, this will change with the printer output device refactor!
|
||||
sidebar_component_path = os.path.join(Resources.getPath(Application.getInstance().ResourceTypes.QmlFiles), "Sidebar.qml")
|
||||
sidebar_component = Application.getInstance().createQmlComponent(sidebar_component_path)
|
||||
self.addDisplayComponent("sidebar", sidebar_component)
|
||||
self.addDisplayComponent("sidebar", sidebar_component_path)
|
||||
self.setIconSource(Application.getInstance().getTheme().getIcon("tab_status_connected"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue