Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura/UI
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2020-04-29 12:37:42 +0300
committerKostas Karmas <konskarm@gmail.com>2020-04-29 12:37:42 +0300
commitb2382593ed67ef566ca03ae540c1a1500146a620 (patch)
treea84dedfd4a90c5e691322285d04672dfd324e0f1 /cura/UI
parente4a6fe954db0ba2e6806637251b8795cf9cf59c4 (diff)
Add is_final_page attribute and mark the "Add Cloud Printers" page as final
CURA-7022
Diffstat (limited to 'cura/UI')
-rw-r--r--cura/UI/WelcomePagesModel.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py
index 611e62cfd6..b816833d67 100644
--- a/cura/UI/WelcomePagesModel.py
+++ b/cura/UI/WelcomePagesModel.py
@@ -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,