Mercurial > hg > svgui
diff layer/LayerFactory.cpp @ 623:49afde2dd704 tonioni
put the FlexiNote layer before the note layer to see what happens -- not much
author | matthiasm |
---|---|
date | Tue, 26 Mar 2013 20:14:08 +0000 |
parents | e7352a4c0a05 |
children | 1336439dc055 |
line wrap: on
line diff
--- a/layer/LayerFactory.cpp Tue Mar 26 17:00:45 2013 +0000 +++ b/layer/LayerFactory.cpp Tue Mar 26 20:14:08 2013 +0000 @@ -161,11 +161,13 @@ } if (dynamic_cast<NoteModel *>(model)) { + types.insert(FlexiNotes); types.insert(Notes); } if (dynamic_cast<FlexiNoteModel *>(model)) { types.insert(FlexiNotes); + types.insert(Notes); } if (dynamic_cast<RegionModel *>(model)) { @@ -196,8 +198,8 @@ LayerTypeSet types; types.insert(TimeInstants); types.insert(TimeValues); + types.insert(FlexiNotes); types.insert(Notes); - types.insert(FlexiNotes); types.insert(Regions); types.insert(Text); types.insert(Image); @@ -213,8 +215,8 @@ if (dynamic_cast<const TimeRulerLayer *>(layer)) return TimeRuler; if (dynamic_cast<const TimeInstantLayer *>(layer)) return TimeInstants; if (dynamic_cast<const TimeValueLayer *>(layer)) return TimeValues; + if (dynamic_cast<const FlexiNoteLayer *>(layer)) return FlexiNotes; if (dynamic_cast<const NoteLayer *>(layer)) return Notes; - if (dynamic_cast<const FlexiNoteLayer *>(layer)) return FlexiNotes; if (dynamic_cast<const RegionLayer *>(layer)) return Regions; if (dynamic_cast<const TextLayer *>(layer)) return Text; if (dynamic_cast<const ImageLayer *>(layer)) return Image; @@ -257,7 +259,7 @@ case TimeInstants: return "timeinstants"; case TimeValues: return "timevalues"; case Notes: return "notes"; - case FlexiNotes: return "flexible notes"; + case FlexiNotes: return "flexinotes"; case Regions: return "regions"; case Text: return "text"; case Image: return "image"; @@ -278,7 +280,7 @@ if (name == "timeruler") return TimeRuler; if (name == "timeinstants") return TimeInstants; if (name == "timevalues") return TimeValues; - if (name == "flexible notes") return FlexiNotes; + if (name == "flexinotes") return FlexiNotes; if (name == "regions") return Regions; if (name == "text") return Text; if (name == "image") return Image; @@ -347,10 +349,10 @@ return new SparseOneDimensionalModel(baseModel->getSampleRate(), 1); } else if (layerType == TimeValues) { return new SparseTimeValueModel(baseModel->getSampleRate(), 1, true); + } else if (layerType == FlexiNotes) { + return new FlexiNoteModel(baseModel->getSampleRate(), 1, true); } else if (layerType == Notes) { return new NoteModel(baseModel->getSampleRate(), 1, true); - } else if (layerType == FlexiNotes) { - return new NoteModel(baseModel->getSampleRate(), 1, true); } else if (layerType == Regions) { return new RegionModel(baseModel->getSampleRate(), 1, true); } else if (layerType == Text) { @@ -418,14 +420,14 @@ layer = new TimeValueLayer; break; + case FlexiNotes: + layer = new FlexiNoteLayer; + break; + case Notes: layer = new NoteLayer; break; - case FlexiNotes: - layer = new FlexiNoteLayer; - break; - case Regions: layer = new RegionLayer; break;