comparison data/model/NoteModel.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
306 case 3: e1 = e0.withDuration(value.toInt()); break; 306 case 3: e1 = e0.withDuration(value.toInt()); break;
307 case 4: e1 = e0.withLevel(float(value.toDouble())); break; 307 case 4: e1 = e0.withLevel(float(value.toDouble())); break;
308 case 5: e1 = e0.withLabel(value.toString()); break; 308 case 5: e1 = e0.withLabel(value.toString()); break;
309 } 309 }
310 310
311 ChangeEventsCommand *command = 311 auto command = new ChangeEventsCommand<Model>(getId(), tr("Edit Data"));
312 new ChangeEventsCommand(this, tr("Edit Data"));
313 command->remove(e0); 312 command->remove(e0);
314 command->add(e1); 313 command->add(e1);
315 return command->finish(); 314 return command->finish();
316 } 315 }
317 316