mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-19 05:05:53 +08:00
Do not restore add printer dialog size
CURA-10896
This commit is contained in:
parent
15243fd6f9
commit
9e5ad281d5
@ -822,14 +822,26 @@ UM.MainWindow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property var wizardDialog
|
||||||
|
Component
|
||||||
|
{
|
||||||
|
id: addMachineDialogLoader
|
||||||
|
|
||||||
Cura.WizardDialog
|
Cura.WizardDialog
|
||||||
{
|
{
|
||||||
id: addMachineDialog
|
|
||||||
title: catalog.i18nc("@title:window", "Add Printer")
|
title: catalog.i18nc("@title:window", "Add Printer")
|
||||||
maximumWidth: Screen.width * 2
|
maximumWidth: Screen.width * 2
|
||||||
maximumHeight: Screen.height * 2
|
maximumHeight: Screen.height * 2
|
||||||
model: CuraApplication.getAddPrinterPagesModel()
|
model: CuraApplication.getAddPrinterPagesModel()
|
||||||
progressBarVisible: false
|
progressBarVisible: false
|
||||||
|
onVisibleChanged:
|
||||||
|
{
|
||||||
|
if(!visible)
|
||||||
|
{
|
||||||
|
wizardDialog = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.WizardDialog
|
Cura.WizardDialog
|
||||||
@ -854,9 +866,8 @@ UM.MainWindow
|
|||||||
target: Cura.Actions.addMachine
|
target: Cura.Actions.addMachine
|
||||||
function onTriggered()
|
function onTriggered()
|
||||||
{
|
{
|
||||||
// Make sure to show from the first page when the dialog shows up.
|
wizardDialog = addMachineDialogLoader.createObject()
|
||||||
addMachineDialog.resetModelState()
|
wizardDialog.show()
|
||||||
addMachineDialog.show()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,11 +32,6 @@ Window
|
|||||||
property var model: null // Needs to be set by whoever is using this dialog.
|
property var model: null // Needs to be set by whoever is using this dialog.
|
||||||
property alias progressBarVisible: wizardPanel.progressBarVisible
|
property alias progressBarVisible: wizardPanel.progressBarVisible
|
||||||
|
|
||||||
function resetModelState()
|
|
||||||
{
|
|
||||||
model.resetState()
|
|
||||||
}
|
|
||||||
|
|
||||||
WizardPanel
|
WizardPanel
|
||||||
{
|
{
|
||||||
id: wizardPanel
|
id: wizardPanel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user