mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 3 additions and 3 deletions
|
|
@ -161,7 +161,7 @@ Window
|
||||||
{
|
{
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
text: catalog.i18nc("@button", "Sync materials with USB")
|
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
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
|
|
@ -348,7 +348,7 @@ Window
|
||||||
{
|
{
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
text: catalog.i18nc("@button", "Sync materials with USB")
|
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
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
|
|
@ -413,7 +413,7 @@ Window
|
||||||
{
|
{
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
text: catalog.i18nc("@button", "Sync materials with USB")
|
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
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue