mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Add is_final_page attribute and mark the "Add Cloud Printers" page as final
CURA-7022
This commit is contained in:
parent
e4a6fe954d
commit
b2382593ed
1 changed files with 8 additions and 1 deletions
|
@ -119,8 +119,10 @@ class WelcomePagesModel(ListModel):
|
|||
return
|
||||
next_page_index = idx
|
||||
|
||||
is_final_page = page_item.get("is_final_page")
|
||||
|
||||
# If we have reached the last page, emit allFinished signal and reset.
|
||||
if next_page_index == len(self._items):
|
||||
if next_page_index == len(self._items) or is_final_page:
|
||||
self.atEnd()
|
||||
return
|
||||
|
||||
|
@ -255,6 +257,11 @@ class WelcomePagesModel(ListModel):
|
|||
"page_url": self._getBuiltinWelcomePagePath("AddPrinterByIpContent.qml"),
|
||||
"next_page_id": "machine_actions",
|
||||
},
|
||||
{"id": "add_cloud_printers",
|
||||
"page_url": self._getBuiltinWelcomePagePath("AddCloudPrintersView.qml"),
|
||||
"is_final_page": True, # If we end up in this page, the next button will close the dialog
|
||||
"next_page_button_text": self._catalog.i18nc("@action:button", "Finish"),
|
||||
},
|
||||
{"id": "machine_actions",
|
||||
"page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"),
|
||||
"should_show_function": self.shouldShowMachineActions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue