Fix sidebar loading and unloading depending on active stage

This commit is contained in:
ChrisTerBeke 2017-12-06 17:46:18 +01:00
parent 2d044a37ae
commit ee643610e5
7 changed files with 601 additions and 603 deletions

View file

@ -1,18 +1,22 @@
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from PyQt5.QtCore import pyqtProperty, QObject
from PyQt5.QtCore import pyqtProperty, QUrl, QObject
from UM.Stage import Stage
class CuraStage(Stage):
def __init__(self):
super().__init__()
def __init__(self, parent = None):
super().__init__(parent)
@pyqtProperty(QObject, constant = True)
@pyqtProperty(str, constant = True)
def stageId(self):
return self.getPluginId()
@pyqtProperty(QUrl, constant = True)
def mainComponent(self):
return self.getDisplayComponent("main")
@pyqtProperty(QObject, constant = True)
@pyqtProperty(QUrl, constant = True)
def sidebarComponent(self):
return self.getDisplayComponent("sidebar")