Mercurial > hg > svgui
changeset 748:84e4cf889659 tonioni
Make pitch-track editing operations update the notes as well, automatically
author | Chris Cannam |
---|---|
date | Thu, 27 Mar 2014 18:02:12 +0000 |
parents | bc049f1f080e |
children | 03423269a9d0 |
files | layer/FlexiNoteLayer.cpp |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Thu Mar 27 16:30:26 2014 +0000 +++ b/layer/FlexiNoteLayer.cpp Thu Mar 27 18:02:12 2014 +0000 @@ -1301,7 +1301,8 @@ for (int i = 0; i < v->getLayerCount(); ++i) { Layer *layer = v->getLayer(i); - if (layer && !layer->isLayerDormant(v)) { + if (layer && !layer->isLayerDormant(v) && + layer->getLayerPresentationName() != "candidate") { cerr << "FlexiNoteLayer::getAssociatedPitchModel: looks like our layer is " << layer << endl; SparseTimeValueModel *model = qobject_cast<SparseTimeValueModel *> (layer->getModel()); @@ -1335,7 +1336,7 @@ cerr << "snapSelectedNotesToPitchTrack: looking at note from " << note.frame << " to " << note.frame + note.duration << endl; - if (!s.contains(note.frame) || + if (!s.contains(note.frame) && !s.contains(note.frame + note.duration - 1)) { continue; } @@ -1405,7 +1406,7 @@ dataPoints.begin(); i != dataPoints.end(); ++i) { if (i->frame >= note.frame && i->frame < note.frame + note.duration) { - pitchValues.push_back((*i).value); + pitchValues.push_back(i->value); } }