diff layer/LayerFactory.cpp @ 349:369a197737c7

* Various fixes to object lifetime management, particularly in the spectrum layer and for notification of main model deletion. The main purpose of this is to improve the behaviour of the spectrum, but I think it may also help with #1840922 Various crashes in Layer Summary window.
author Chris Cannam
date Wed, 23 Jan 2008 15:43:27 +0000
parents 4a542ba875c2
children d58701996fae
line wrap: on
line diff
--- a/layer/LayerFactory.cpp	Wed Jan 23 11:38:34 2008 +0000
+++ b/layer/LayerFactory.cpp	Wed Jan 23 15:43:27 2008 +0000
@@ -350,6 +350,10 @@
 	dynamic_cast<SpectrogramLayer *>(layer)->setChannel(channel);
 	return;
     }
+    if (dynamic_cast<SpectrumLayer *>(layer)) {
+	dynamic_cast<SpectrumLayer *>(layer)->setChannel(channel);
+	return;
+    }
 }
 
 Layer *