From 23b877a86962354fcdac272f7d6fecd1257126a7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 13 Feb 2016 21:28:32 -0800 Subject: QML UI: don't change dive while editing If the user taps on a dive in the dive list while a dive is being edited or added, ignore that tap. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveList.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'qt-mobile/qml/DiveList.qml') diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 298680682..a36758a98 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -26,9 +26,11 @@ MobileComponents.Page { // When clicked, the mode changes to details view onClicked: { - diveListView.currentIndex = index - detailsWindow.showDiveIndex(index); - stackView.push(detailsWindow); + if (detailsWindow.state === "view") { + diveListView.currentIndex = index + detailsWindow.showDiveIndex(index); + stackView.push(detailsWindow); + } } Item { -- cgit v1.2.3-70-g09d2