mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 03:04:23 +08:00
Delay showing the Add Machine dialog until after the main window is properly shown
Showing the main window causes the Add Machine window to hide apparently so instead make sure we show the add machine dialog after showing the main window. This also handles the "there is no machine" situation a little more cleanly.
This commit is contained in:
parent
ca7ed0d93e
commit
c486794f33
@ -173,11 +173,6 @@ class CuraApplication(QtApplication):
|
||||
self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml"))
|
||||
self.initializeEngine()
|
||||
|
||||
manager = self.getMachineManager()
|
||||
if not self.getMachineManager().getMachineInstances():
|
||||
self.requestAddPrinter.emit()
|
||||
|
||||
|
||||
if self._engine.rootObjects:
|
||||
self.closeSplash()
|
||||
|
||||
|
@ -652,14 +652,30 @@ UM.MainWindow
|
||||
onRequestAddPrinter:
|
||||
{
|
||||
addMachineWizard.visible = true
|
||||
addMachineWizard.firstRun = true
|
||||
addMachineWizard.firstRun = false
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura"))
|
||||
base.visible = true;
|
||||
visible = true;
|
||||
addMachineTimer.start();
|
||||
}
|
||||
|
||||
Timer
|
||||
{
|
||||
id: addMachineTimer;
|
||||
interval: 100;
|
||||
repeat: false;
|
||||
onTriggered:
|
||||
{
|
||||
if(UM.MachineManager.activeMachineInstance == "")
|
||||
{
|
||||
addMachineWizard.firstRun = true;
|
||||
addMachineWizard.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user