Make sidebar view working for active stage

This commit is contained in:
ChrisTerBeke 2017-12-06 12:23:41 +01:00
parent 0e1c9146cf
commit a57a5aab6b
14 changed files with 605 additions and 812 deletions

View file

@ -1,6 +1,8 @@
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path
from UM.Application import Application
from UM.Resources import Resources
from cura.Stages.CuraStage import CuraStage
@ -9,3 +11,9 @@ class PrepareStage(CuraStage):
def __init__(self):
super().__init__()
Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
def _engineCreated(self):
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)