diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-30 05:53:50 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-30 05:53:50 +0900 |
commit | 85e3a4ad2902c5aabb5944f94961d0e1610bad26 (patch) | |
tree | f967025c0802981f97fd52e21f68e1abaf9d38f5 /qt-ui | |
parent | bc48a4200fc3e03a82efe6aefd9c8938dfcbcb50 (diff) | |
download | subsurface-85e3a4ad2902c5aabb5944f94961d0e1610bad26.tar.gz |
Fix sorting by rating
In commit beb4ed38f264 ("Add a "sort role" for sorting the dive list")
Linus forgot to add a case for the rating value.
Now all columns sort correctly.
With this I think we can close the bug...
Fixes #111
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/models.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 0d3c903a7..045592deb 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -837,6 +837,7 @@ QVariant DiveItem::data(int column, int role) const switch (column) { case NR: retVal = dive->number; break; case DATE: retVal = (qulonglong) dive->when; break; + case RATING: retVal = dive->rating; break; case DEPTH: retVal = dive->maxdepth.mm; break; case DURATION: retVal = dive->duration.seconds; break; case TEMPERATURE: retVal = dive->watertemp.mkelvin; break; |