diff layer/Colour3DPlotLayer.cpp @ 193:57c2350a8c40

* Add slice layers (so you can display a slice of a colour 3d plot as if it were a spectrum) * Make spectrum layer a subclass of slice layer
author Chris Cannam
date Fri, 26 Jan 2007 16:59:57 +0000
parents 42118892f428
children 6b023411087b
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Wed Jan 24 17:14:24 2007 +0000
+++ b/layer/Colour3DPlotLayer.cpp	Fri Jan 26 16:59:57 2007 +0000
@@ -30,7 +30,6 @@
 
 
 Colour3DPlotLayer::Colour3DPlotLayer() :
-    Layer(),
     m_model(0),
     m_cache(0),
     m_colourScale(LinearScale)
@@ -45,6 +44,8 @@
 void
 Colour3DPlotLayer::setModel(const DenseThreeDimensionalModel *model)
 {
+    if (m_model == model) return;
+    const DenseThreeDimensionalModel *oldModel = m_model;
     m_model = model;
     if (!m_model || !m_model->isOK()) return;
 
@@ -60,6 +61,7 @@
 	    this, SLOT(cacheInvalid(size_t, size_t)));
 
     emit modelReplaced();
+    emit sliceableModelReplaced(oldModel, model);
 }
 
 void