mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Reuse welcome dialog item to show whats new upon start
CURA-6447
This commit is contained in:
parent
a49d00c60e
commit
44a0f00f0b
2 changed files with 5 additions and 14 deletions
|
@ -100,26 +100,16 @@ UM.MainWindow
|
|||
welcomeDialogItem.visible = false
|
||||
}
|
||||
|
||||
// Reuse the welcome dialog item to show "What's New" only.
|
||||
if (CuraApplication.shouldShowWhatsNewDialog())
|
||||
{
|
||||
showWhatsNewDialogTimer.start()
|
||||
welcomeDialogItem.model = CuraApplication.getWhatsNewPagesModel()
|
||||
welcomeDialogItem.progressBarVisible = false
|
||||
welcomeDialogItem.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: Use a timer here because if we call "Cura.Actions.whatsNew.trigger()" or "whatsNewDialog.show()" when
|
||||
// the component gets completed or when the application finishes its initialization, the main window has not been
|
||||
// fully initialized yet. If we should the dialog before the main window is fully initialized, you will see the
|
||||
// dialog first but when the main windows is fully initialized, the dialog will disappear. Adding a timer here is
|
||||
// to bypass this problem.
|
||||
Timer
|
||||
{
|
||||
id: showWhatsNewDialogTimer
|
||||
repeat: false
|
||||
interval: 1000
|
||||
onTriggered: Cura.Actions.whatsNew.trigger()
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: backgroundItem
|
||||
|
|
|
@ -26,6 +26,7 @@ Item
|
|||
|
||||
property int shadowOffset: 1 * screenScaleFactor
|
||||
|
||||
property alias progressBarVisible: wizardPanel.progressBarVisible
|
||||
property var model: CuraApplication.getWelcomePagesModel()
|
||||
|
||||
onVisibleChanged:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue