Make bar lines on the canvas draw from top to bottom no matter how few
authorSampo Savolainen <v2@iki.fi>
Mon, 14 Aug 2006 19:19:06 +0000 (19:19 +0000)
committerSampo Savolainen <v2@iki.fi>
Mon, 14 Aug 2006 19:19:06 +0000 (19:19 +0000)
tracks are visible.

Make tracks toggle when ctrl-clicked

git-svn-id: svn://localhost/ardour2/trunk@824 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_tempodisplay.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/selection.cc

index 91710c5fc968e2da2e24556ec1f95bcb49057004..5e906cb6172b3146c39b3bc4850c43cf180fac00 100644 (file)
@@ -194,6 +194,7 @@ Editor::draw_measures ()
 
        double x1, x2, y1, y2;
        track_canvas.get_scroll_region (x1, y1, x2, y2);
+       y2 = 1000000000.0f;
 
        for (i = all_bbt_points->begin(); i != all_bbt_points->end(); ++i) {
 
index 6e578a13e7cc75b6868d3875b197c247409a750a..05f832700ea90b669d394a18888956eb46013011 100644 (file)
@@ -878,8 +878,7 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
 
        switch (Keyboard::selection_type (ev->state)) {
        case Selection::Toggle:
-               /* XXX this is not right */
-               editor.get_selection().add (*tracks);
+               editor.get_selection().toggle (*tracks);
                break;
                
        case Selection::Set:
index 086d878994813f56ce96e2faa98cbfd7b15b46da..aa7fdbe30f8ff6d803ce3bec91b9534737c6def3 100644 (file)
@@ -179,6 +179,14 @@ Selection::toggle (Playlist* pl)
        PlaylistsChanged ();
 }
 
+void
+Selection::toggle (const list<TimeAxisView*>& track_list)
+{
+       for (list<TimeAxisView*>::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
+               toggle ( (*i) );
+       }
+}
+
 void
 Selection::toggle (TimeAxisView* track)
 {
@@ -616,6 +624,7 @@ Selection::set (list<Selectable*>& selectables)
        add (selectables);
 }
 
+
 void
 Selection::add (list<Selectable*>& selectables)
 {