mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 12:39:06 +08:00
CURA-5253 Initialize UI elements right after the qml files were loaded.
This commit is contained in:
parent
90eb4eb651
commit
b582ac7526
@ -724,12 +724,6 @@ class CuraApplication(QtApplication):
|
||||
|
||||
controller = self.getController()
|
||||
|
||||
# Initialize UI state
|
||||
controller.setActiveStage("PrepareStage")
|
||||
controller.setActiveView("SolidView")
|
||||
controller.setCameraTool("CameraTool")
|
||||
controller.setSelectionTool("SelectionTool")
|
||||
|
||||
t = controller.getTool("TranslateTool")
|
||||
if t:
|
||||
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.YAxis, ToolHandle.ZAxis])
|
||||
@ -766,8 +760,11 @@ class CuraApplication(QtApplication):
|
||||
self._qml_import_paths.append(Resources.getPath(self.ResourceTypes.QmlFiles))
|
||||
self.initializeEngine()
|
||||
|
||||
# Make sure the correct stage is activated after QML is loaded
|
||||
# Initialize UI state
|
||||
controller.setActiveStage("PrepareStage")
|
||||
controller.setActiveView("SolidView")
|
||||
controller.setCameraTool("CameraTool")
|
||||
controller.setSelectionTool("SelectionTool")
|
||||
|
||||
# Hide the splash screen
|
||||
self.closeSplash()
|
||||
|
@ -201,7 +201,11 @@ Rectangle
|
||||
// the connection to UM.ActiveView will trigger update so there is no reason to call it manually here
|
||||
}
|
||||
|
||||
onCurrentIndexChanged: viewModeButton.setActiveIndex(model.getItem(currentIndex).id)
|
||||
onCurrentIndexChanged:
|
||||
{
|
||||
if (model.getItem(currentIndex).id != undefined)
|
||||
viewModeButton.setActiveIndex(model.getItem(currentIndex).id)
|
||||
}
|
||||
currentIndex: getActiveIndex()
|
||||
|
||||
// watch the active view proxy for changes made from the menu item
|
||||
|
Loading…
x
Reference in New Issue
Block a user