Mercurial > hg > svgui
changeset 780:bf0b419fdaac tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Thu, 29 May 2014 16:27:52 +0100 |
parents | 037a7c22bec8 (diff) 6d95d87f1654 (current diff) |
children | 052cbaad991e c1fc074971ed |
files | |
diffstat | 3 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Fri May 23 11:17:52 2014 +0100 +++ b/layer/FlexiNoteLayer.cpp Thu May 29 16:27:52 2014 +0100 @@ -1351,11 +1351,14 @@ continue; } + cerr << "snapSelectedNotesToPitchTrack: making new note" << endl; FlexiNote newNote(note); command->deletePoint(note); - + if (updateNoteValue(v, newNote)) { + command->addPoint(newNote); + } } finish(command);
--- a/layer/LayerFactory.cpp Fri May 23 11:17:52 2014 +0100 +++ b/layer/LayerFactory.cpp Thu May 29 16:27:52 2014 +0100 @@ -197,7 +197,7 @@ LayerTypeSet types; types.insert(TimeInstants); types.insert(TimeValues); - types.insert(FlexiNotes); + types.insert(FlexiNotes); types.insert(Notes); types.insert(Regions); types.insert(Text); @@ -214,7 +214,7 @@ 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 FlexiNoteLayer *>(layer)) return FlexiNotes; if (dynamic_cast<const NoteLayer *>(layer)) return Notes; if (dynamic_cast<const RegionLayer *>(layer)) return Regions; if (dynamic_cast<const TextLayer *>(layer)) return Text; @@ -235,7 +235,7 @@ case TimeInstants: return "instants"; case TimeValues: return "values"; case Notes: return "notes"; - case FlexiNotes: return "flexinotes"; + case FlexiNotes: return "flexible notes"; case Regions: return "regions"; case Text: return "text"; case Image: return "image"; @@ -349,7 +349,7 @@ return new SparseOneDimensionalModel(baseModel->getSampleRate(), 1); } else if (layerType == TimeValues) { return new SparseTimeValueModel(baseModel->getSampleRate(), 1, true); - } else if (layerType == FlexiNotes) { + } else if (layerType == FlexiNotes) { return new FlexiNoteModel(baseModel->getSampleRate(), 1, true); } else if (layerType == Notes) { return new NoteModel(baseModel->getSampleRate(), 1, true);
--- a/widgets/PropertyBox.cpp Fri May 23 11:17:52 2014 +0100 +++ b/widgets/PropertyBox.cpp Thu May 29 16:27:52 2014 +0100 @@ -768,7 +768,13 @@ dialog->setLabelText(tr("Set playback clip:")); QComboBox *cb = dialog->findChild<QComboBox *>(); - if (cb) cb->setCurrentText(clip); + if (cb) { + for (int i = 0; i < cb->count(); ++i) { + if (cb->itemText(i) == clip) { + cb->setCurrentIndex(i); + } + } + } connect(dialog, SIGNAL(textValueChanged(QString)), this, SLOT(playClipChanged(QString)));