Make sense of parameter to tav_zoom_step match up with coarser as used for temporal...
authorCarl Hetherington <carl@carlh.net>
Thu, 17 Feb 2011 22:35:42 +0000 (22:35 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 17 Feb 2011 22:35:42 +0000 (22:35 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8896 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor_canvas_events.cc
gtk2_ardour/time_axis_view.cc
gtk2_ardour/time_axis_view.h

index 4a18d0c81345adec5448e72add6341d8da676aef..ad494aabec4b71b4d4282a6b7246b82b385b3045 100644 (file)
@@ -2795,12 +2795,12 @@ Editor::setup_toolbar ()
        tav_expand_button.set_name ("TrackHeightButton");
        tav_expand_button.set_size_request(-1,20);
        tav_expand_button.add (*(manage (new Image (::get_icon("tav_exp")))));
-       tav_expand_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), true));
+       tav_expand_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), false));
 
        tav_shrink_button.set_name ("TrackHeightButton");
        tav_shrink_button.set_size_request(-1,20);
        tav_shrink_button.add (*(manage (new Image (::get_icon("tav_shrink")))));
-       tav_shrink_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), false));
+       tav_shrink_button.signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &Editor::tav_zoom_step), true));
 
        _zoom_box.pack_start (tav_shrink_button);
        _zoom_box.pack_start (tav_expand_button);
index 5028f477894266a80ba1e534d0bcb4cc32b2c72b..fe94cac08410fb3a94b0d436678fd77f9e024689 100644 (file)
@@ -83,7 +83,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
                                }
                        }
                        last_track_height_step_timestamp = get_microseconds();
-                       current_stepping_trackview->step_height (true);
+                       current_stepping_trackview->step_height (false);
                        return true;
                } else {
                        scroll_tracks_up_line ();
@@ -108,7 +108,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
                                }
                        }
                        last_track_height_step_timestamp = get_microseconds();
-                       current_stepping_trackview->step_height (false);
+                       current_stepping_trackview->step_height (true);
                        return true;
                } else {
                        scroll_tracks_down_line ();
index 7c47d5a5e0babeb6e62041ff88ecc7949a6782b6..3cf1377c3bb93492aa336e5eae53107c4e02926c 100644 (file)
@@ -301,7 +301,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
        switch (ev->direction) {
        case GDK_SCROLL_UP:
                if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
-                       step_height (true);
+                       step_height (false);
                        return true;
                } else if (Keyboard::no_modifiers_active (ev->state)) {
                        _editor.scroll_tracks_up_line();
@@ -311,7 +311,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
 
        case GDK_SCROLL_DOWN:
                if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
-                       step_height (false);
+                       step_height (true);
                        return true;
                } else if (Keyboard::no_modifiers_active (ev->state)) {
                        _editor.scroll_tracks_down_line();
@@ -382,21 +382,16 @@ TimeAxisView::hide ()
        Hiding ();
 }
 
+/** Steps through the defined heights for this TrackView.
+ *  @param coarser true if stepping should decrease in size, otherwise false.
+ */
 void
-TimeAxisView::step_height (bool bigger)
+TimeAxisView::step_height (bool coarser)
 {
        static const uint32_t step = 25;
 
-       if (bigger) {
-               if (height == preset_height(HeightSmall)) {
-                       set_height_enum (HeightSmaller);
-               } else if (height == preset_height(HeightSmaller)) {
-                       set_height_enum (HeightNormal);
-               } else {
-                       set_height (height + step);
-               }
-
-       } else {
+       if (coarser) {
+               
                if (height == preset_height (HeightSmall)) {
                        return;
                }
@@ -407,7 +402,18 @@ TimeAxisView::step_height (bool bigger)
                        set_height_enum (HeightSmaller);
                } else {
                        set_height (height - step);
-               } 
+               }
+               
+       } else {
+               
+               if (height == preset_height(HeightSmall)) {
+                       set_height_enum (HeightSmaller);
+               } else if (height == preset_height(HeightSmaller)) {
+                       set_height_enum (HeightNormal);
+               } else {
+                       set_height (height + step);
+               }
+               
        }
 }
 
index 55553fafe96a92cc2790875787732070e3a551c3..16c527d2be1d1e8b83eaaab75922b9fb755f716c 100644 (file)
@@ -154,13 +154,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
 
        std::pair<TimeAxisView*, ARDOUR::layer_t> covers_y_position (double);
 
-       /**
-        * Steps through the defined heights for this TrackView.
-        * Sets bigger to true to step up in size, set to fals eot step smaller.
-        *
-        * @param bigger true if stepping should increase in size, false otherwise
-        */
-       virtual void step_height (bool bigger);
+       virtual void step_height (bool);
 
        virtual ARDOUR::RouteGroup* route_group() const { return 0; }
        virtual boost::shared_ptr<ARDOUR::Playlist> playlist() const { return boost::shared_ptr<ARDOUR::Playlist> (); }