diff options
author | Sebastian Kügler <sebas@kde.org> | 2015-11-07 23:46:36 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-07 15:51:09 -0800 |
commit | bfe24526d35c47c1229a0711882d4e789fb46731 (patch) | |
tree | bf755f19a461362535b044d0abd0d3d7c331a0aa /qt-mobile/qml | |
parent | 9ff701069d6567fa9004902d302b798dc7afd88d (diff) | |
download | subsurface-bfe24526d35c47c1229a0711882d4e789fb46731.tar.gz |
fix startpage appearing over dive list
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@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml')
-rw-r--r-- | qt-mobile/qml/DiveList.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index b731a34d5..52f0d6a91 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); } } } |