From bfe24526d35c47c1229a0711882d4e789fb46731 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Sat, 7 Nov 2015 23:46:36 +0000 Subject: fix startpage appearing over dive list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveList.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-mobile/qml') 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); } } } -- cgit v1.2.3-70-g09d2