Move some code into Component.onCompleted

CURA-6447
This commit is contained in:
Lipu Fei 2019-04-17 09:42:40 +02:00
parent 64cb86217e
commit a49d00c60e

View File

@ -68,12 +68,17 @@ UM.MainWindow
z: greyOutBackground.z + 1 z: greyOutBackground.z + 1
} }
Component.onCompleted:
{
CuraApplication.setMinimumWindowSize(UM.Theme.getSize("window_minimum_size"))
CuraApplication.purgeWindows()
}
Connections Connections
{ {
target: CuraApplication target: CuraApplication
onInitializationFinished: onInitializationFinished:
{ {
CuraApplication.setMinimumWindowSize(UM.Theme.getSize("window_minimum_size"))
// Workaround silly issues with QML Action's shortcut property. // Workaround silly issues with QML Action's shortcut property.
// //
// Currently, there is no way to define shortcuts as "Application Shortcut". // Currently, there is no way to define shortcuts as "Application Shortcut".
@ -85,7 +90,6 @@ UM.MainWindow
// //
// This has been fixed for QtQuick Controls 2 since the Shortcut item has a context property. // This has been fixed for QtQuick Controls 2 since the Shortcut item has a context property.
Cura.Actions.parent = backgroundItem Cura.Actions.parent = backgroundItem
CuraApplication.purgeWindows()
if (CuraApplication.shouldShowWelcomeDialog()) if (CuraApplication.shouldShowWelcomeDialog())
{ {