summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_selection.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-06-18 03:48:39 +1000
committernick_m <mainsbridge@gmail.com>2015-06-18 03:48:39 +1000
commit639750f815a856bd9a61355e0d8e331e0fe215b6 (patch)
treef26530e69ffae7fab297c4dad3605c17027306aa /gtk2_ardour/editor_selection.cc
parent80090f0f71256d65c876f83d3c6f3637cb9d44bb (diff)
Don't add history by clicking a control point, fix control point selection.
- also make set_selected_control_point_from_click () return something useful.
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r--gtk2_ardour/editor_selection.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index b071ed6e1b..a04ea77f06 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -325,19 +325,23 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
if (!clicked_control_point) {
return false;
}
+ bool ret = false;
switch (op) {
case Selection::Set:
if (press) {
selection->set (clicked_control_point);
+ ret = true;
}
break;
case Selection::Add:
if (press) {
selection->add (clicked_control_point);
+ ret = true;
}
break;
case Selection::Toggle:
+
/* This is a bit of a hack; if we Primary-Click-Drag a control
point (for push drag) we want the point we clicked on to be
selected, otherwise we end up confusingly dragging an
@@ -352,9 +356,11 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
*/
selection->toggle (clicked_control_point);
_control_point_toggled_on_press = true;
+ ret = true;
} else if (!press && !_control_point_toggled_on_press) {
/* This is the release, and the point wasn't toggled on the press, so do it now */
selection->toggle (clicked_control_point);
+ ret = true;
} else {
/* Reset our flag */
_control_point_toggled_on_press = false;
@@ -365,7 +371,7 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
break;
}
- return true;
+ return ret;
}
void