mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:18:58 +08:00
Link to USB page without depending on actual order of pages
This is more future-proof. If someone were to add a page to the end, it wouldn't immediately break these buttons any more. An example of why self-documenting code can be good. Contributes to issue CURA-8609.
This commit is contained in:
parent
d9d83b4334
commit
75c7d5c4f5
@ -161,7 +161,7 @@ Window
|
||||
{
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@button", "Sync materials with USB")
|
||||
onClicked: swipeView.currentIndex = swipeView.count - 1 //Go to the last page, which is USB.
|
||||
onClicked: swipeView.currentIndex = removableDriveSyncPage.SwipeView.index
|
||||
}
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
@ -348,7 +348,7 @@ Window
|
||||
{
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@button", "Sync materials with USB")
|
||||
onClicked: swipeView.currentIndex = swipeView.count - 1 //Go to the last page, which is USB.
|
||||
onClicked: swipeView.currentIndex = removableDriveSyncPage.SwipeView.index
|
||||
}
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
@ -413,7 +413,7 @@ Window
|
||||
{
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@button", "Sync materials with USB")
|
||||
onClicked: swipeView.currentIndex = swipeView.count - 1 //Go to the last page, which is USB.
|
||||
onClicked: swipeView.currentIndex = removableDriveSyncPage.SwipeView.index
|
||||
}
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user