diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 4ca814ce64..b14c5f20e7 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1658,7 +1658,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD /* object rubberband select process */ - bool select_all_within (framepos_t, framepos_t, double, double, TrackViewList const &, Selection::Operation, bool); + void select_all_within (framepos_t, framepos_t, double, double, TrackViewList const &, Selection::Operation, bool); ArdourCanvas::SimpleRect *rubberband_rect; diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 24182397c3..caaccb1fca 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3044,15 +3044,12 @@ RubberbandSelectDrag::finished (GdkEvent* event, bool movement_occurred) _editor->begin_reversible_command (_("rubberband selection")); if (grab_frame() < last_pointer_frame()) { - committed = _editor->select_all_within (grab_frame(), last_pointer_frame() - 1, y1, y2, _editor->track_views, op, false); + _editor->select_all_within (grab_frame(), last_pointer_frame() - 1, y1, y2, _editor->track_views, op, false); } else { - committed = _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op, false); - } - - if (!committed) { - _editor->commit_reversible_command (); + _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op, false); } + _editor->commit_reversible_command (); } else { if (!getenv("ARDOUR_SAE")) { _editor->selection->clear_tracks(); diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 0a7ad1958c..482a778ae7 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1275,7 +1275,7 @@ Editor::invert_selection () * @param preserve_if_selected true to leave the current selection alone if we're adding to the selection and all of the selectables * within the region are already selected. */ -bool +void Editor::select_all_within ( framepos_t start, framepos_t end, double top, double bot, const TrackViewList& tracklist, Selection::Operation op, bool preserve_if_selected ) @@ -1292,7 +1292,7 @@ Editor::select_all_within ( } if (found.empty()) { - return false; + return; } if (preserve_if_selected && op != Selection::Toggle) { @@ -1302,7 +1302,7 @@ Editor::select_all_within ( } if (i == found.end()) { - return false; + return; } } @@ -1323,8 +1323,6 @@ Editor::select_all_within ( } commit_reversible_command (); - - return !found.empty(); } void