From 34581e4de93e304680f947e049a4afdb2297ceb3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 24 Jan 2012 22:17:24 +0000 Subject: [PATCH] fix breakage of normal method of creating an empty MIDI region git-svn-id: svn://localhost/ardour2/branches/3.0@11341 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_mouse.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 85ffaf2943..ade27923b7 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -1269,14 +1269,18 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp return true; } + + if (internal_editing()) { + bool leave_internal_edit_mode = false; + switch (item_type) { case NoteItem: break; case RegionItem: if (!dynamic_cast (clicked_regionview)) { - ActionManager::do_action ("MouseMode", "toggle-internal-edit"); + leave_internal_edit_mode = true; } break; @@ -1294,8 +1298,18 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp change the editing mode. */ break; + + case StreamItem: + if (!dynamic_cast (clicked_axisview)) { + leave_internal_edit_mode = true; + } + break; default: + break; + } + + if (leave_internal_edit_mode) { ActionManager::do_action ("MouseMode", "toggle-internal-edit"); } }