summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-06-15 13:45:04 -1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-15 17:03:23 -0700
commit84d4a2dae069a2e728cea8d7a4506921b558603f (patch)
treecdb619c942177d34cd9226c5ef7a9277c6c3c302
parenta960cd2d459a04a87e3bd05ecff885c342b8e761 (diff)
downloadsubsurface-84d4a2dae069a2e728cea8d7a4506921b558603f.tar.gz
Partially fix dive downloading
The Qt branch didn't set the preexisting dive count, so matching old dives didn't work and it always downloaded all of them. Also, we need to autogroup dives before displaying them if autogrouping is on. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/models.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 601f2f628..b85c06741 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1057,6 +1057,9 @@ void DiveTripModel::setupModelData()
endRemoveRows();
}
+ if (autogroup)
+ autogroup_dives();
+ dive_table.preexisting = dive_table.nr;
while (--i >= 0) {
struct dive* dive = get_dive(i);
update_cylinder_related_info(dive);