summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-05-19 20:10:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-05-19 20:10:35 +0000
commit9c6984dbbb5583147788876dba80e203c2d38d1a (patch)
tree4db0a08b1049f8ddd8f237c85474568e8a62e099 /gtk2_ardour/editor_mouse.cc
parent50ee09e80ff91bf0146e89728578d5e31aba23b7 (diff)
allow for mandatory control protocols, plus some ongoing work on automation control point selection (unfinished)
git-svn-id: svn://localhost/trunk/ardour2@516 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 21e99ae202..bf8b16c0d7 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -328,7 +328,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
case PanAutomationControlPointItem:
case RedirectAutomationControlPointItem:
if ((cp = static_cast<ControlPoint *> (item->get_data ("control_point"))) != 0) {
- set_selected_control_point_from_click (Keyboard::selection_type (event->button.state), true);
+ set_selected_control_point_from_click (Keyboard::selection_type (event->button.state), false);
}
break;
@@ -2495,13 +2495,26 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
cp->line.point_drag (*cp, cx_frames , fraction, push);
set_verbose_canvas_cursor_text (cp->line.get_verbose_cursor_string (fraction));
+
+ drag_info.first_move = false;
}
void
Editor::control_point_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{
ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
- control_point_drag_motion_callback (item, event);
+
+ if (drag_info.first_move) {
+
+ /* just a click */
+
+ if ((event->type == GDK_BUTTON_RELEASE) && (event->button.button == 1) && Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
+ reset_point_selection ();
+ }
+
+ } else {
+ control_point_drag_motion_callback (item, event);
+ }
cp->line.end_drag (cp);
}