diff options
author | Carl Hetherington <carl@carlh.net> | 2010-01-08 01:28:15 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-01-08 01:28:15 +0000 |
commit | 1a1edc9ca1b3b601934c2079d66e4172e43bc606 (patch) | |
tree | 28ca8587ac06e2825347c20aaf95c79e794c60cc /gtk2_ardour/editor_mouse.cc | |
parent | 2e30bdba9f4841fd050c7ef4e960617761b85453 (diff) |
Make a new action "escape", bound to the Escape key, and make it
abort a drag (if one is in progress) or clear the selection.
Fix breaking of drags in a few cases; some still to do.
git-svn-id: svn://localhost/ardour2/branches/3.0@6467 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index cb9926d3a4..c0beab03aa 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2639,10 +2639,22 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event) } void +Editor::escape () +{ + if (_drag) { + break_drag (); + } else { + selection->clear (); + } +} + +void Editor::break_drag () { if (_drag) { _drag->break_drag (); + delete _drag; + _drag = 0; } } |