mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
89c7e4cd67
commit
cd28082c39
4 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@ import org.subsurfacedivelog.mobile 1.0
|
||||||
Item {
|
Item {
|
||||||
id: diveDetailsWindow
|
id: diveDetailsWindow
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
objectName: "DiveDetails"
|
||||||
|
|
||||||
property string location
|
property string location
|
||||||
property string dive_id
|
property string dive_id
|
||||||
|
|
|
@ -7,6 +7,7 @@ import QtQuick.Layouts 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: page
|
id: page
|
||||||
|
objectName: "DiveList"
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: diveDelegate
|
id: diveDelegate
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.subsurfacedivelog.mobile 1.0
|
||||||
Item {
|
Item {
|
||||||
id: logWindow
|
id: logWindow
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
objectName: "Log"
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
@ -42,6 +42,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
if (stackView.currentItem.objectName == "DiveDetails")
|
||||||
|
{
|
||||||
manager.commitChanges(
|
manager.commitChanges(
|
||||||
dive_id,
|
dive_id,
|
||||||
suit,
|
suit,
|
||||||
|
@ -49,6 +51,7 @@ Rectangle {
|
||||||
divemaster,
|
divemaster,
|
||||||
notes
|
notes
|
||||||
)
|
)
|
||||||
|
}
|
||||||
stackView.pop();
|
stackView.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue