diff options
author | nick_m <mainsbridge@gmail.com> | 2015-06-17 00:45:04 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-06-17 09:54:22 +1000 |
commit | 4c1d79af4a253ff8a031a7c07a6fdd8d92d0b0e3 (patch) | |
tree | 9005cba5bbcbcd0072be32ecb95383fb6dfafd7b /gtk2_ardour/editor_mouse.cc | |
parent | 15336d06e41fed130f1a0db9eee07b74546c7d92 (diff) |
Unbreak region brush drag wrt undo, avoid some dangling commands in the gui
- also allow moving of automation lines in internal mouse mode.
- this is also a first pass at ensuring that if an operation does
nothing, avoid an undo entry.
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 5c106785e2..8c5e6711f9 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -766,6 +766,11 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT return true; break; + case AutomationLineItem: + _drags->set (new LineDrag (this, item), event); + return true; + break; + case StreamItem: //in the past, we created a new midi region here, but perhaps that is best left to the Draw mode break; @@ -2200,7 +2205,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, framepos_t pos) // playlist is frozen, so we have to update manually XXX this is disgusting - playlist->RegionAdded (new_region); /* EMIT SIGNAL */ + //playlist->RegionAdded (new_region); /* EMIT SIGNAL */ } gint @@ -2262,8 +2267,6 @@ Editor::add_region_brush_drag (ArdourCanvas::Item* item, GdkEvent*, RegionView* } _drags->add (new RegionMoveDrag (this, item, region_view, selection->regions.by_layer(), true, false)); - - begin_reversible_command (Operations::drag_region_brush); } /** Start a grab where a time range is selected, track(s) are selected, and the @@ -2303,7 +2306,6 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event) /* A selection grab currently creates two undo/redo operations, one for creating the new region and another for moving it. */ - begin_reversible_command (Operations::selection_grab); boost::shared_ptr<Playlist> playlist = clicked_axisview->playlist(); @@ -2316,6 +2318,7 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event) if (latest_regionviews.empty()) { /* something went wrong */ + abort_reversible_command (); return; } |