change selection behaviour for track header context click
[ardour.git] / gtk2_ardour / time_axis_view.cc
index 0a5d65b13dff56387b83c8aeb80af8f9d3af7514..7d69459197d8d334fa9d4d86c786b156c3f22398 100644 (file)
@@ -147,7 +147,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie
 
        controls_frame.add (controls_hbox);
        controls_frame.set_name ("TimeAxisViewControlsBaseUnselected");
-       controls_frame.set_shadow_type (Gtk::SHADOW_OUT);
+       controls_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
 
        ColorChanged.connect (mem_fun (*this, &TimeAxisView::color_handler));
 }
@@ -233,7 +233,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
                
                if (canvas_item_visible ((*i)->canvas_display)) {
                        ++nth;
-                       effective_height += (*i)->show_at (y + 1 + effective_height, nth, parent);
+                       effective_height += (*i)->show_at (y + effective_height, nth, parent);
                }
        }
 
@@ -246,14 +246,14 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
        switch (ev->direction) {
        case GDK_SCROLL_UP:
                if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
-                       step_height (false);
+                       step_height (true);
                        return true;
                }
                break;
                
        case GDK_SCROLL_DOWN:
                if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
-                       step_height (true);
+                       step_height (false);
                        return true;
                }
                break;
@@ -361,7 +361,7 @@ void
 TimeAxisView::set_height_pixels (uint32_t h)
 {
        height = h;
-       controls_frame.set_size_request (-1, height);
+       controls_frame.set_size_request (-1, height + ((order == 0) ? 1 : 0));
 
        if (canvas_item_visible (selection_group)) {
                /* resize the selection rect */
@@ -515,7 +515,11 @@ TimeAxisView::popup_display_menu (guint32 when)
        if (display_menu == 0) {
                build_display_menu ();
        }
-       editor.set_selected_track (*this, Selection::Add);
+
+       if (!get_selected()) {
+               editor.set_selected_track (*this, Selection::Set);
+       }
+
        display_menu->popup (1, when);  
 }
 
@@ -846,7 +850,7 @@ TimeAxisView::touched (double top, double bot)
           y_position is the "origin" or "top" of the track.
         */
 
-       double mybot = y_position + height; // XXX need to include Editor::track_spacing; 
+       double mybot = y_position + height;
        
        return ((y_position <= bot && y_position >= top) || 
                ((mybot <= bot) && (top < mybot)) ||