summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-02-06 15:50:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-02-06 15:50:05 +0000
commitaa60114843f4990ef93ba83974501495ddda358b (patch)
treeb5318deb08d54fa28c350ac2266ce6e338721eb8 /gtk2_ardour/editor_mouse.cc
parent63d28ebd1808b316dd2f8d152d94577b898d336c (diff)
some fixes/improvements for track selection; add upload target to manual makefile; do not build peakfile for SilentFileSource
git-svn-id: svn://localhost/ardour2/trunk@1426 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc44
1 files changed, 18 insertions, 26 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 881be020a9..10f4c0eb03 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -301,7 +301,9 @@ 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 != MouseTimeFX || item_type != RegionItem) &&
+ (mouse_mode != MouseRange)) ||
+
(event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE || event->button.button > 3)) {
return;
@@ -324,31 +326,41 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
switch (item_type) {
case RegionItem:
- commit = set_selected_regionview_from_click (press, op, true);
+ if (mouse_mode != MouseRange) {
+ commit = set_selected_regionview_from_click (press, op, true);
+ }
break;
case RegionViewNameHighlight:
case RegionViewName:
- commit = set_selected_regionview_from_click (press, op, true);
+ if (mouse_mode != MouseRange) {
+ commit = set_selected_regionview_from_click (press, op, true);
+ }
break;
case FadeInHandleItem:
case FadeInItem:
case FadeOutHandleItem:
case FadeOutItem:
- commit = set_selected_regionview_from_click (press, op, true);
+ if (mouse_mode != MouseRange) {
+ commit = set_selected_regionview_from_click (press, op, true);
+ }
break;
case GainAutomationControlPointItem:
case PanAutomationControlPointItem:
case RedirectAutomationControlPointItem:
- commit = set_selected_control_point_from_click (op, false);
+ if (mouse_mode != MouseRange) {
+ commit = set_selected_control_point_from_click (op, false);
+ }
break;
case StreamItem:
+ /* for context click or range selection, select track */
if (event->button.button == 3) {
- /* for context click, select track */
commit = set_selected_track_from_click (press, op, true);
+ } else if (event->type == GDK_BUTTON_PRESS && mouse_mode == MouseRange) {
+ commit = set_selected_track_from_click (press, op, false);
}
break;
@@ -360,26 +372,6 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
break;
}
-#define SELECT_TRACK_FROM_CANVAS_IN_RANGE_MODE
-#ifdef SELECT_TRACK_FROM_CANVAS_IN_RANGE_MODE
- /* in range mode, button 1/2/3 press potentially selects a track */
-
- if (mouse_mode == MouseRange &&
- event->type == GDK_BUTTON_PRESS &&
- event->button.button <= 3) {
-
- switch (item_type) {
- case StreamItem:
- case RegionItem:
- case AutomationTrackItem:
- commit = set_selected_track_from_click (true, op, true);
- break;
-
- default:
- break;
- }
- }
-#endif
if (commit) {
commit_reversible_command ();
}