comparison 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
comparison
equal deleted inserted replaced
1751:77543124651b 1752:6d09d68165a4
36 source->getResolution() * m_columnsPerPeak, 36 source->getResolution() * m_columnsPerPeak,
37 source->getHeight(), 37 source->getHeight(),
38 EditableDenseThreeDimensionalModel::NoCompression, 38 EditableDenseThreeDimensionalModel::NoCompression,
39 false)); 39 false));
40 40
41 connect(source.get(), SIGNAL(modelChanged()), 41 connect(source.get(), SIGNAL(modelChanged(ModelId)),
42 this, SLOT(sourceModelChanged())); 42 this, SLOT(sourceModelChanged(ModelId)));
43 } 43 }
44 44
45 Dense3DModelPeakCache::~Dense3DModelPeakCache() 45 Dense3DModelPeakCache::~Dense3DModelPeakCache()
46 { 46 {
47 } 47 }
59 if (!haveColumn(column)) fillColumn(column); 59 if (!haveColumn(column)) fillColumn(column);
60 return m_cache->getValueAt(column, n); 60 return m_cache->getValueAt(column, n);
61 } 61 }
62 62
63 void 63 void
64 Dense3DModelPeakCache::sourceModelChanged() 64 Dense3DModelPeakCache::sourceModelChanged(ModelId)
65 { 65 {
66 if (m_coverage.size() > 0) { 66 if (m_coverage.size() > 0) {
67 // The last peak may have come from an incomplete read, which 67 // The last peak may have come from an incomplete read, which
68 // may since have been filled, so reset it 68 // may since have been filled, so reset it
69 m_coverage[m_coverage.size()-1] = false; 69 m_coverage[m_coverage.size()-1] = false;