Implement shift-right-click to delete MIDI note (#3170)
git-svn-id: svn://localhost/ardour2/branches/3.0@7155 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
97721226a4
commit
ee61c5c9ea
@ -197,6 +197,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||||||
void step_mouse_mode (bool next);
|
void step_mouse_mode (bool next);
|
||||||
Editing::MouseMode current_mouse_mode () const { return mouse_mode; }
|
Editing::MouseMode current_mouse_mode () const { return mouse_mode; }
|
||||||
Editing::MidiEditMode current_midi_edit_mode () const;
|
Editing::MidiEditMode current_midi_edit_mode () const;
|
||||||
|
void remove_midi_note (ArdourCanvas::Item *, GdkEvent *);
|
||||||
|
|
||||||
bool internal_editing() const { return _internal_editing ; }
|
bool internal_editing() const { return _internal_editing ; }
|
||||||
void set_internal_edit (bool yn);
|
void set_internal_edit (bool yn);
|
||||||
|
@ -1222,6 +1222,10 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NoteItem:
|
||||||
|
remove_midi_note (item, event);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2654,3 +2658,12 @@ Editor::effective_mouse_mode () const
|
|||||||
|
|
||||||
return mouse_mode;
|
return mouse_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::remove_midi_note (ArdourCanvas::Item* item, GdkEvent *)
|
||||||
|
{
|
||||||
|
ArdourCanvas::CanvasNoteEvent* e = dynamic_cast<ArdourCanvas::CanvasNoteEvent*> (item);
|
||||||
|
assert (e);
|
||||||
|
|
||||||
|
e->region_view().delete_note (e->note ());
|
||||||
|
}
|
||||||
|
@ -1531,6 +1531,16 @@ MidiRegionView::delete_selection()
|
|||||||
apply_delta ();
|
apply_delta ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MidiRegionView::delete_note (boost::shared_ptr<NoteType> n)
|
||||||
|
{
|
||||||
|
start_delta_command (_("delete note"));
|
||||||
|
_delta_command->remove (n);
|
||||||
|
apply_delta ();
|
||||||
|
|
||||||
|
trackview.editor().hide_verbose_canvas_cursor ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiRegionView::clear_selection_except(ArdourCanvas::CanvasNoteEvent* ev)
|
MidiRegionView::clear_selection_except(ArdourCanvas::CanvasNoteEvent* ev)
|
||||||
{
|
{
|
||||||
|
@ -193,6 +193,7 @@ class MidiRegionView : public RegionView
|
|||||||
void note_selected(ArdourCanvas::CanvasNoteEvent* ev, bool add, bool extend=false);
|
void note_selected(ArdourCanvas::CanvasNoteEvent* ev, bool add, bool extend=false);
|
||||||
void note_deselected(ArdourCanvas::CanvasNoteEvent* ev);
|
void note_deselected(ArdourCanvas::CanvasNoteEvent* ev);
|
||||||
void delete_selection();
|
void delete_selection();
|
||||||
|
void delete_note (boost::shared_ptr<NoteType>);
|
||||||
size_t selection_size() { return _selection.size(); }
|
size_t selection_size() { return _selection.size(); }
|
||||||
|
|
||||||
void move_selection(double dx, double dy);
|
void move_selection(double dx, double dy);
|
||||||
|
Loading…
Reference in New Issue
Block a user