summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-04-18 19:12:12 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-04-18 19:12:12 +0000
commit107426f3546db96eac7b54a1909fc465173aead3 (patch)
tree2012ee6dad125a287b5dc9001aff35e3ba8b0d20 /gtk2_ardour
parent3675945248bbb15f81d3c419ea1086c731d08e24 (diff)
make rubber band select act across all tracks, not the current selection
git-svn-id: svn://localhost/ardour2/trunk@1728 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_markers.cc2
-rw-r--r--gtk2_ardour/editor_mouse.cc6
-rw-r--r--gtk2_ardour/editor_selection.cc6
4 files changed, 8 insertions, 8 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 38b5b279ef..10880c7b1b 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1435,7 +1435,7 @@ class Editor : public PublicEditor
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
- bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
+ bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
ArdourCanvas::SimpleRect *rubberband_rect;
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index f306c185f5..29a212f2f5 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -594,7 +594,7 @@ Editor::marker_menu_select_all_selectables_using_range ()
bool is_start;
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
- select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, Selection::Set);
+ select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, track_views, Selection::Set);
}
}
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 1a9e1161c2..f39abf192c 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -4521,7 +4521,7 @@ Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
switch (mouse_mode) {
case MouseObject:
/* find the two markers on either side and then make the selection from it */
- select_all_within (start, end, 0.0f, FLT_MAX, Selection::Set);
+ select_all_within (start, end, 0.0f, FLT_MAX, track_views, Selection::Set);
break;
case MouseRange:
@@ -4724,9 +4724,9 @@ Editor::end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
begin_reversible_command (_("rubberband selection"));
if (drag_info.grab_frame < drag_info.last_pointer_frame) {
- commit = select_all_within (drag_info.grab_frame, drag_info.last_pointer_frame, y1, y2, op);
+ commit = select_all_within (drag_info.grab_frame, drag_info.last_pointer_frame, y1, y2, track_views, op);
} else {
- commit = select_all_within (drag_info.last_pointer_frame, drag_info.grab_frame, y1, y2, op);
+ commit = select_all_within (drag_info.last_pointer_frame, drag_info.grab_frame, y1, y2, track_views, op);
}
if (commit) {
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index e710a790cb..3758e40d38 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -245,7 +245,7 @@ Editor::set_selected_control_point_from_click (Selection::Operation op, bool no_
y1 = clicked_control_point->get_x() - 10;
y2 = clicked_control_point->get_y() + 10;
- return select_all_within (x1, x2, y1, y2, op);
+ return select_all_within (x1, x2, y1, y2, selection->tracks, op);
}
void
@@ -770,13 +770,13 @@ Editor::invert_selection ()
}
bool
-Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, Selection::Operation op)
+Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, const TrackViewList& tracklist, Selection::Operation op)
{
list<Selectable*> touched;
list<Selectable*>::size_type n = 0;
TrackViewList touched_tracks;
- for (TrackViewList::iterator iter = selection->tracks.begin(); iter != selection->tracks.end(); ++iter) {
+ for (TrackViewList::const_iterator iter = tracklist.begin(); iter != tracklist.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
}