diff layer/LayerFactory.cpp @ 156:b32282fefccd

* Tidy up inheritance hierarchy of model classes -- remove ZoomConstraint as a base class (make it a member instead) and remove virtual inheritances of QObject (no longer necessary).
author Chris Cannam
date Thu, 05 Oct 2006 11:03:06 +0000
parents 9e6b3e239b9d
children 57c2350a8c40
line wrap: on
line diff
--- a/layer/LayerFactory.cpp	Wed Oct 04 14:01:28 2006 +0000
+++ b/layer/LayerFactory.cpp	Thu Oct 05 11:03:06 2006 +0000
@@ -32,6 +32,8 @@
 #include "data/model/NoteModel.h"
 #include "data/model/TextModel.h"
 #include "data/model/DenseThreeDimensionalModel.h"
+#include "data/model/WaveFileModel.h"
+#include "data/model/WritableWaveFileModel.h"
 
 LayerFactory *
 LayerFactory::m_instance = new LayerFactory;
@@ -200,7 +202,13 @@
 void
 LayerFactory::setModel(Layer *layer, Model *model)
 {
-    if (trySetModel<WaveformLayer, RangeSummarisableTimeValueModel>(layer, model))
+//    if (trySetModel<WaveformLayer, RangeSummarisableTimeValueModel>(layer, model))
+//	return;
+
+    if (trySetModel<WaveformLayer, WaveFileModel>(layer, model))
+	return;
+
+    if (trySetModel<WaveformLayer, WritableWaveFileModel>(layer, model))
 	return;
 
     if (trySetModel<SpectrogramLayer, DenseTimeValueModel>(layer, model))