comparison data/model/RegionModel.h @ 1741:9d82b164f264 by-id

Work on commands, and some other model updates
author Chris Cannam
date Thu, 27 Jun 2019 13:08:10 +0100
parents 78fe29adfd16
children 52705a328b34
comparison
equal deleted inserted replaced
1740:fe3f7f8df3a3 1741:9d82b164f264
289 case 2: e1 = e0.withValue(float(value.toDouble())); break; 289 case 2: e1 = e0.withValue(float(value.toDouble())); break;
290 case 3: e1 = e0.withDuration(value.toInt()); break; 290 case 3: e1 = e0.withDuration(value.toInt()); break;
291 case 4: e1 = e0.withLabel(value.toString()); break; 291 case 4: e1 = e0.withLabel(value.toString()); break;
292 } 292 }
293 293
294 ChangeEventsCommand *command = 294 auto command = new ChangeEventsCommand<Model>(getId(), tr("Edit Data"));
295 new ChangeEventsCommand(this, tr("Edit Data"));
296 command->remove(e0); 295 command->remove(e0);
297 command->add(e1); 296 command->add(e1);
298 return command->finish(); 297 return command->finish();
299 } 298 }
300 299