Reset page index to 0 when re-opening sync dialogue

When the user previously opened the dialog and advanced through the pages, but closes the window, then they'll probably have to restart when they want to try it again.

Contributes to issue CURA-8609.
This commit is contained in:
Ghostkeeper 2021-10-05 13:32:37 +02:00
parent 9b1c8d1c7a
commit f2aba01eff
No known key found for this signature in database
GPG Key ID: 68F39EA88EEED5FF
2 changed files with 3 additions and 0 deletions

View File

@ -277,6 +277,7 @@ class MaterialManagementModel(QObject):
self._sync_all_dialog = cura.CuraApplication.CuraApplication.getInstance().createQmlComponent(qml_path, {})
if self._sync_all_dialog is None: # Failed to load QML file.
return
self._sync_all_dialog.setProperty("pageIndex", 0)
self._sync_all_dialog.show()
@pyqtSlot(result = QUrl)

View File

@ -20,6 +20,8 @@ Window
height: minimumHeight
modality: Qt.ApplicationModal
property alias pageIndex: swipeView.currentIndex
SwipeView
{
id: swipeView