mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 07:13:24 +00:00
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>
This commit is contained in:
parent
9ff701069d
commit
bfe24526d3
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue