+void
+MidiRegionView::note_dropped(CanvasMidiEvent* ev, double dt, uint8_t dnote)
+{
+ // TODO: This would be faster/nicer with a MoveCommand that doesn't need to copy...
+ if (_selection.find(ev) != _selection.end()) {
+ start_delta_command();
+
+ for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
+ command_remove_note(*i);
+ MidiModel::Note copy(*(*i)->note());
+
+ copy.set_time((*i)->note()->time() + dt);
+ copy.set_note((*i)->note()->note() + dnote);
+
+ command_add_note(copy);
+ }
+ apply_command();
+ }
+}
+
+
+void
+MidiRegionView::note_entered(ArdourCanvas::CanvasMidiEvent* ev)
+{
+ cerr << "NOTE ENTERED: " << _mouse_state << endl;
+ if (ev->note() && _mouse_state == EraseTouchDragging) {
+ start_delta_command();
+ ev->selected(true);
+ _delta_command->remove(*ev->note());
+ } else if (_mouse_state == SelectTouchDragging) {
+ note_selected(ev, true);
+ }
+}
+
+
+void
+MidiRegionView::switch_source(boost::shared_ptr<Source> src)
+{
+ boost::shared_ptr<MidiSource> msrc = boost::dynamic_pointer_cast<MidiSource>(src);
+ if (msrc)
+ display_model(msrc->model());
+}
+