Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 2226:a4dde0f408e4 single-point
Further single-point API updates
author | Chris Cannam |
---|---|
date | Tue, 19 Mar 2019 13:07:20 +0000 |
parents | b0e8217719ed |
children | ca0ee1fe88c7 |
comparison
equal
deleted
inserted
replaced
2225:1c1a908aeb6a | 2226:a4dde0f408e4 |
---|---|
4651 | 4651 |
4652 Model *model = static_cast<Layer *>(currentTimeValueLayer)->getModel(); | 4652 Model *model = static_cast<Layer *>(currentTimeValueLayer)->getModel(); |
4653 SparseTimeValueModel *tvm = | 4653 SparseTimeValueModel *tvm = |
4654 dynamic_cast<SparseTimeValueModel *>(model); | 4654 dynamic_cast<SparseTimeValueModel *>(model); |
4655 if (tvm) { | 4655 if (tvm) { |
4656 SparseTimeValueModel::Point point(frame, | 4656 Event point(frame, float(ev.getPitch() % 12), ""); |
4657 float(ev.getPitch() % 12), | 4657 AddEventCommand *command = new AddEventCommand |
4658 ""); | |
4659 SparseTimeValueModel::AddPointCommand *command = | |
4660 new SparseTimeValueModel::AddPointCommand | |
4661 (tvm, point, tr("Add Point")); | 4658 (tvm, point, tr("Add Point")); |
4662 CommandHistory::getInstance()->addCommand(command); | 4659 CommandHistory::getInstance()->addCommand(command); |
4663 } | 4660 } |
4664 | 4661 |
4665 continue; | 4662 continue; |