# HG changeset patch # User Chris Cannam # Date 1552659886 0 # Node ID eec0c50bb44f52ddbeff4314448a79b242c59071 # Parent 25554f7a5b0d68ceb4a1e4975ae05914b53f17e2 Update following RegionModel API change diff -r 25554f7a5b0d -r eec0c50bb44f framework/MainWindowBase.cpp --- 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(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(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(); diff -r 25554f7a5b0d -r eec0c50bb44f framework/SVFileReader.cpp --- a/framework/SVFileReader.cpp Fri Mar 15 11:09:34 2019 +0000 +++ b/framework/SVFileReader.cpp Fri Mar 15 14:24:46 2019 +0000 @@ -1129,7 +1129,7 @@ int duration = 0; duration = attributes.value("duration").trimmed().toInt(&ok); QString label = attributes.value("label"); - rm->addPoint(RegionModel::Point(frame, value, duration, label)); + rm->add(Event(frame, value, duration, label)); return ok; }