comparison data/model/SparseTimeValueModel.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
287 case 1: e1 = e0.withFrame(value.toInt()); break; 287 case 1: e1 = e0.withFrame(value.toInt()); break;
288 case 2: e1 = e0.withValue(float(value.toDouble())); break; 288 case 2: e1 = e0.withValue(float(value.toDouble())); break;
289 case 3: e1 = e0.withLabel(value.toString()); break; 289 case 3: e1 = e0.withLabel(value.toString()); break;
290 } 290 }
291 291
292 ChangeEventsCommand *command = 292 auto command = new ChangeEventsCommand<Model>(getId(), tr("Edit Data"));
293 new ChangeEventsCommand(this, tr("Edit Data"));
294 command->remove(e0); 293 command->remove(e0);
295 command->add(e1); 294 command->add(e1);
296 return command->finish(); 295 return command->finish();
297 } 296 }
298 297