summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-25 11:45:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-25 11:45:31 +0000
commitdf2fe18399bb85ab3e2d3dd8c0ddb4b9a7379def (patch)
tree9f6a79d239f3d8fbbc7a0a5c846e7b20afea31e4 /gtk2_ardour/editor_mouse.cc
parent895419625b75e0b1497e49fd571bc21cd27202bd (diff)
carl's fix to select objects when clicking in mouseGain mode, so that right click operations don't act on unexpected objects
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4252 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 7be0a55c21..f8f7002fb7 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -395,10 +395,11 @@ Editor::step_mouse_mode (bool next)
void
Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
- /* in object/audition/timefx mode, any button press sets
- the selection if the object can be selected. this is a
- bit of hack, because we want to avoid this if the
- mouse operation is a region alignment.
+ /* in object/audition/timefx/gain-automation mode,
+ any button press sets the selection if the object
+ can be selected. this is a bit of hack, because
+ we want to avoid this if the mouse operation is a
+ region alignment.
note: not dbl-click or triple-click
*/
@@ -406,6 +407,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
if (((mouse_mode != MouseObject) &&
(mouse_mode != MouseAudition || item_type != RegionItem) &&
(mouse_mode != MouseTimeFX || item_type != RegionItem) &&
+ (mouse_mode != MouseGain) &&
(mouse_mode != MouseRange)) ||
((event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE) || event->button.button > 3)) {
@@ -424,7 +426,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
}
}
}
-
+
Selection::Operation op = Keyboard::selection_type (event->button.state);
bool press = (event->type == GDK_BUTTON_PRESS);