mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:49:03 +08:00
Reuse welcome dialog item to show whats new upon start
CURA-6447
This commit is contained in:
parent
a49d00c60e
commit
44a0f00f0b
@ -100,26 +100,16 @@ UM.MainWindow
|
|||||||
welcomeDialogItem.visible = false
|
welcomeDialogItem.visible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reuse the welcome dialog item to show "What's New" only.
|
||||||
if (CuraApplication.shouldShowWhatsNewDialog())
|
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
|
Item
|
||||||
{
|
{
|
||||||
id: backgroundItem
|
id: backgroundItem
|
||||||
|
@ -26,6 +26,7 @@ Item
|
|||||||
|
|
||||||
property int shadowOffset: 1 * screenScaleFactor
|
property int shadowOffset: 1 * screenScaleFactor
|
||||||
|
|
||||||
|
property alias progressBarVisible: wizardPanel.progressBarVisible
|
||||||
property var model: CuraApplication.getWelcomePagesModel()
|
property var model: CuraApplication.getWelcomePagesModel()
|
||||||
|
|
||||||
onVisibleChanged:
|
onVisibleChanged:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user