diff options
author | Grace Karanja <gracie.karanja89@gmail.com> | 2015-08-20 11:44:01 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-31 15:49:09 -0700 |
commit | cd28082c395002e027f682500670e79b934b9cf8 (patch) | |
tree | 3d49546a5198499b4e2a356dc6e66b0fcac1abfc /qt-mobile | |
parent | 89c7e4cd67eee5c24c107e36d44370b4772ad15d (diff) | |
download | subsurface-cd28082c395002e027f682500670e79b934b9cf8.tar.gz |
QML UI: Fix error when closing the log window
When closing the log window, do not try to save the changes. This
should only be done when closing the DiveDetails.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/DiveDetails.qml | 1 | ||||
-rw-r--r-- | qt-mobile/DiveList.qml | 1 | ||||
-rw-r--r-- | qt-mobile/Log.qml | 1 | ||||
-rw-r--r-- | qt-mobile/TopBar.qml | 3 |
4 files changed, 6 insertions, 0 deletions
diff --git a/qt-mobile/DiveDetails.qml b/qt-mobile/DiveDetails.qml index 6f42f20d0..afb62104a 100644 --- a/qt-mobile/DiveDetails.qml +++ b/qt-mobile/DiveDetails.qml @@ -10,6 +10,7 @@ import org.subsurfacedivelog.mobile 1.0 Item { id: diveDetailsWindow width: parent.width + objectName: "DiveDetails" property string location property string dive_id diff --git a/qt-mobile/DiveList.qml b/qt-mobile/DiveList.qml index acf123011..d244c5bec 100644 --- a/qt-mobile/DiveList.qml +++ b/qt-mobile/DiveList.qml @@ -7,6 +7,7 @@ import QtQuick.Layouts 1.0 Rectangle { id: page + objectName: "DiveList" Component { id: diveDelegate diff --git a/qt-mobile/Log.qml b/qt-mobile/Log.qml index f51b4ac94..0bd812f3f 100644 --- a/qt-mobile/Log.qml +++ b/qt-mobile/Log.qml @@ -10,6 +10,7 @@ import org.subsurfacedivelog.mobile 1.0 Item { id: logWindow width: parent.width + objectName: "Log" ColumnLayout { width: parent.width diff --git a/qt-mobile/TopBar.qml b/qt-mobile/TopBar.qml index 1e34fcebc..1edd868c2 100644 --- a/qt-mobile/TopBar.qml +++ b/qt-mobile/TopBar.qml @@ -42,6 +42,8 @@ Rectangle { } } onClicked: { + if (stackView.currentItem.objectName == "DiveDetails") + { manager.commitChanges( dive_id, suit, @@ -49,6 +51,7 @@ Rectangle { divemaster, notes ) + } stackView.pop(); } } |