Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2017-11-27 15:00:49 +0300
committerJaime van Kessel <nallath@gmail.com>2017-11-27 15:00:49 +0300
commit0613b1e4b7589446ee9692c87226dfd9f158a00d (patch)
tree3597f3d226f8c168968b8fd5744402c2fafbfd00 /cura/MachineAction.py
parentffef26097d275608062ae2b7b671ff2142a753dc (diff)
Creating components is now done with the prefab function
CURA-4568
Diffstat (limited to 'cura/MachineAction.py')
-rw-r--r--cura/MachineAction.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/cura/MachineAction.py b/cura/MachineAction.py
index bc7b17af85..37f09b4efa 100644
--- a/cura/MachineAction.py
+++ b/cura/MachineAction.py
@@ -73,14 +73,8 @@ class MachineAction(QObject, PluginObject):
## Protected helper to create a view object based on provided QML.
def _createViewFromQML(self):
- path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), self._qml_url))
- self._component = QQmlComponent(Application.getInstance()._engine, path)
- self._context = QQmlContext(Application.getInstance()._engine.rootContext())
- self._context.setContextProperty("manager", self)
- self._view = self._component.create(self._context)
- if self._view is None:
- Logger.log("c", "QQmlComponent status %s", self._component.status())
- Logger.log("c", "QQmlComponent error string %s", self._component.errorString())
+ path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), self._qml_url)
+ self._view = Application.getInstance().createQmlComponent(path, {"manager": self})
@pyqtProperty(QObject, constant = True)
def displayItem(self):