Mercurial > hg > svcore
comparison data/model/TextModel.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 |
---|---|
224 case 1: e1 = e0.withFrame(value.toInt()); break; | 224 case 1: e1 = e0.withFrame(value.toInt()); break; |
225 case 2: e1 = e0.withValue(float(value.toDouble())); break; | 225 case 2: e1 = e0.withValue(float(value.toDouble())); break; |
226 case 3: e1 = e0.withLabel(value.toString()); break; | 226 case 3: e1 = e0.withLabel(value.toString()); break; |
227 } | 227 } |
228 | 228 |
229 ChangeEventsCommand *command = | 229 auto command = new ChangeEventsCommand<Model>(getId(), tr("Edit Data")); |
230 new ChangeEventsCommand(this, tr("Edit Data")); | |
231 command->remove(e0); | 230 command->remove(e0); |
232 command->add(e1); | 231 command->add(e1); |
233 return command->finish(); | 232 return command->finish(); |
234 } | 233 } |
235 | 234 |