Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 648:eec0c50bb44f single-point
Update following RegionModel API change
author | Chris Cannam |
---|---|
date | Fri, 15 Mar 2019 14:24:46 +0000 |
parents | 25554f7a5b0d |
children | 284cb118368e |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Fri Mar 15 11:09:34 2019 +0000 +++ b/framework/MainWindowBase.cpp Fri Mar 15 14:24:46 2019 +0000 @@ -1230,14 +1230,12 @@ RegionModel *rm = dynamic_cast<RegionModel *>(layer->getModel()); if (rm) { - RegionModel::Point point(alignedStart, - rm->getValueMaximum() + 1, - alignedDuration, - ""); - RegionModel::EditCommand *command = - new RegionModel::EditCommand(rm, tr("Add Point")); - command->addPoint(point); - command->setName(name); + Event point(alignedStart, + rm->getValueMaximum() + 1, + alignedDuration, + ""); + ChangeEventsCommand *command = new ChangeEventsCommand(rm, name); + command->add(point); c = command->finish(); } @@ -1248,11 +1246,11 @@ NoteModel *nm = dynamic_cast<NoteModel *>(layer->getModel()); if (nm) { - Event point(alignedStart, - nm->getValueMinimum(), - alignedDuration, - 1.f, - ""); + Event point(alignedStart, + nm->getValueMinimum(), + alignedDuration, + 1.f, + ""); ChangeEventsCommand *command = new ChangeEventsCommand(nm, name); command->add(point); c = command->finish();