[PATCH] fix startpage appearing over dive list
Sebastian Kügler
sebas at kde.org
Sat Nov 7 15:46:36 PST 2015
Use the view, rather than the model to check if the list is empty. This
allows us to use the property notifiers rather than a function call, and
hence fixes updating the visibility of the startpage when the listview
gets filled (or emptied).
Signed-off-by: Sebastian Kügler <sebas at kde.org>
---
qt-mobile/qml/DiveList.qml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index b731a34..52f0d6a 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -169,11 +169,11 @@ Rectangle {
}
StartPage {
anchors.fill: parent
- opacity: (diveModel.rowCount() == 0) ? 1.0 : 0
+ opacity: (diveListView.count == 0) ? 1.0 : 0
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: units.shortDuration } }
Component.onCompleted: {
- print("diveModel.count " + diveModel.rowCount());
+ print("diveListView.count " + diveListView.count);
}
}
}
--
2.6.2
More information about the subsurface
mailing list