mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 20:50:37 +08:00

This commit adds an additional AddPrinterPagesModel in Cura that does not have the "Cancel" button in the "Add Printer" page. To achieve that, the AddPrinterPagesModel is modified so that its initialize function decides whether or not it will add the cancel button. If Cura ends up in a state without an active machine, the AddPrinters dialog will open up using the showAddPrintersUncancellableDialog signal and display the new "Uncancellable" (is this a word?) AddPrinterPagesModel, so that the dialog cannot be dismissed. If Cura is closed at that point, the next time it is initiated, if the user is logged in and there is no ActiveMachine, then instead of displaying the entire WelcomePages wizard, it will show the uncancellable AddPrinterPagesModel, forcing the user to add a printer. CURA-7454