Fix toggle selection for control points.

git-svn-id: svn://localhost/ardour2/branches/3.0@12057 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-04-22 23:14:27 +00:00
parent ac1b2a6647
commit b5a9d37cb0
3 changed files with 7 additions and 3 deletions

View file

@ -652,7 +652,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void select_all_tracks ();
void select_all_internal_edit (Selection::Operation);
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
bool set_selected_control_point_from_click (bool press, Selection::Operation op = Selection::Set);
void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
void set_selected_track_as_side_effect (Selection::Operation op);
bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set);

View file

@ -655,7 +655,7 @@ Editor::button_selection (ArdourCanvas::Item* /*item*/, GdkEvent* event, ItemTyp
case ControlPointItem:
set_selected_track_as_side_effect (op);
if (doing_object_stuff() || (mouse_mode != MouseRange && mouse_mode != MouseObject)) {
set_selected_control_point_from_click (op, false);
set_selected_control_point_from_click (press, op);
}
break;

View file

@ -314,12 +314,16 @@ Editor::set_selected_track_from_click (bool press, Selection::Operation op, bool
}
bool
Editor::set_selected_control_point_from_click (Selection::Operation op, bool /*no_remove*/)
Editor::set_selected_control_point_from_click (bool press, Selection::Operation op)
{
if (!clicked_control_point) {
return false;
}
if (!press) {
return true;
}
switch (op) {
case Selection::Set:
selection->set (clicked_control_point);