From 745bbb8afbe6a492ba0fcd6d33b45dbd842e5cc9 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 4 Aug 2013 20:44:31 +0200 Subject: [PATCH] don't show save button while on page 1 --- data/qml/StationView.qml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/data/qml/StationView.qml b/data/qml/StationView.qml index fca3a53ed..4d772bae8 100644 --- a/data/qml/StationView.qml +++ b/data/qml/StationView.qml @@ -23,7 +23,7 @@ Rectangle { subtitle: generator.summary showSearchField: false showBackButton: stationListView.currentIndex > 0 - showNextButton: mainView.configured && stationListView.currentIndex > 0 + showNextButton: mainView.configured && stationListView.currentIndex == 2 nextButtonText: "Save" backButtonText: "Back" @@ -32,11 +32,13 @@ Rectangle { onBackPressed: { inputBubble.opacity = 0 stationListView.decrementCurrentIndex() - if(stationListView.currentIndex == 1) { - subtitle = modeModel.get(stationCreator.modeIndex).headerSubtitle + "..." - } - if(stationListView.currentIndex == 0) { + switch (stationListView.currentIndex) { + case 0: subtitle = "" + break; + case 1: + subtitle = modeModel.get(stationCreator.modeIndex).headerSubtitle + "..." + break; } } // In our case the next button is the save button