Lincoln's patch to fix #3343 (excessively small track heights on zoom out)
authorCarl Hetherington <carl@carlh.net>
Sun, 25 Jul 2010 01:17:54 +0000 (01:17 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 25 Jul 2010 01:17:54 +0000 (01:17 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7488 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/time_axis_view.cc

index de45ee07b765d0bf5fdc0ddf6df96715abae7a5f..741756f1b21c08aa92441f0068d0b310dd9d068e 100644 (file)
@@ -396,36 +396,19 @@ TimeAxisView::step_height (bool bigger)
                if ( height == preset_height(HeightSmall)){
                        return;
                }
-               if (height == preset_height (HeightSmaller)) {
+               
+               if (height <= preset_height (HeightSmaller) && height > preset_height (HeightSmall)) {
                        set_height (preset_height(HeightSmall));
                }
-               else if (height > step) {       
-                       
-                       if ( height <= preset_height (HeightNormal) && height > preset_height (HeightSmaller)){
-                               set_height (preset_height(HeightSmaller));
-                       }
-                       else {
-                               set_height (height - step);
-                       }
+               else if ( height <= preset_height (HeightNormal) && height > preset_height (HeightSmaller)){
+                       set_height (preset_height(HeightSmaller));
+               }
+               else {
+                       set_height (height - step);
                } 
        }
 }
-/*
-       switch (h) {
-       case HeightLargest:
-               return extra_height + 48 + 250;
-       case HeightLarger:
-               return extra_height + 48 + 150;
-       case HeightLarge:
-               return extra_height + 48 + 50;
-       case HeightNormal:
-               return extra_height + 48;
-       case HeightSmall:
-               return 27;
-       case HeightSmaller:
-               return smaller_height;
-       }
-*/
+
 void
 TimeAxisView::set_heights (uint32_t h)
 {