diff data/model/Dense3DModelPeakCache.cpp @ 1752:6d09d68165a4 by-id

Further review of ById: make IDs only available when adding a model to the ById store, not by querying the item directly. This means any id encountered in the wild must have been added to the store at some point (even if later released), which simplifies reasoning about lifecycles
author Chris Cannam
date Fri, 05 Jul 2019 15:28:07 +0100
parents 565575463752
children d484490cdf69
line wrap: on
line diff
--- a/data/model/Dense3DModelPeakCache.cpp	Thu Jul 04 18:04:21 2019 +0100
+++ b/data/model/Dense3DModelPeakCache.cpp	Fri Jul 05 15:28:07 2019 +0100
@@ -38,8 +38,8 @@
                    EditableDenseThreeDimensionalModel::NoCompression,
                    false));
 
-    connect(source.get(), SIGNAL(modelChanged()),
-            this, SLOT(sourceModelChanged()));
+    connect(source.get(), SIGNAL(modelChanged(ModelId)),
+            this, SLOT(sourceModelChanged(ModelId)));
 }
 
 Dense3DModelPeakCache::~Dense3DModelPeakCache()
@@ -61,7 +61,7 @@
 }
 
 void
-Dense3DModelPeakCache::sourceModelChanged()
+Dense3DModelPeakCache::sourceModelChanged(ModelId)
 {
     if (m_coverage.size() > 0) {
         // The last peak may have come from an incomplete read, which