# HG changeset patch # User Chris Cannam # Date 1401789588 -3600 # Node ID 052cbaad991eec9d8bdf1069bb173fa5513f21c1 # Parent 6d95d87f1654be69a75e99d0cba7903347808cdc# Parent bf0b419fdaac5e92ed5cfae5c448cf3e1f967913 Merge from branch tonioni diff -r 6d95d87f1654 -r 052cbaad991e layer/FlexiNoteLayer.cpp --- a/layer/FlexiNoteLayer.cpp Fri May 23 11:17:52 2014 +0100 +++ b/layer/FlexiNoteLayer.cpp Tue Jun 03 10:59:48 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); diff -r 6d95d87f1654 -r 052cbaad991e layer/LayerFactory.cpp --- a/layer/LayerFactory.cpp Fri May 23 11:17:52 2014 +0100 +++ b/layer/LayerFactory.cpp Tue Jun 03 10:59:48 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(layer)) return TimeRuler; if (dynamic_cast(layer)) return TimeInstants; if (dynamic_cast(layer)) return TimeValues; - if (dynamic_cast(layer)) return FlexiNotes; + if (dynamic_cast(layer)) return FlexiNotes; if (dynamic_cast(layer)) return Notes; if (dynamic_cast(layer)) return Regions; if (dynamic_cast(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); diff -r 6d95d87f1654 -r 052cbaad991e widgets/PropertyBox.cpp --- a/widgets/PropertyBox.cpp Fri May 23 11:17:52 2014 +0100 +++ b/widgets/PropertyBox.cpp Tue Jun 03 10:59:48 2014 +0100 @@ -768,7 +768,13 @@ dialog->setLabelText(tr("Set playback clip:")); QComboBox *cb = dialog->findChild(); - 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)));