the "final" (??) fixes for transport state stuff before 2.8.4. y'all let me know...
[ardour.git] / gtk2_ardour / marker_time_axis.cc
index 973bb5d221b941d780f4d0c472eb274822199a4d..f5c80be288c3c729dd34fe6fed291d28b73f18a7 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <string>
@@ -42,6 +41,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace PBD;
 using namespace sigc;
 using namespace Gtk;
 
@@ -57,7 +57,7 @@ using namespace Gtk;
  * @param name the name/id of this time axis
  * @param tav the associated track view that this MarkerTimeAxis is marking up
  */
-MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Canvas& canvas, std::string name, TimeAxisView* tav)
+MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Canvas& canvas, const string & name, TimeAxisView* tav)
        : AxisView(sess),
          VisualTimeAxis(name, ed, sess, canvas)
 {
@@ -71,7 +71,6 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Canvas&
        selection_group->hide();
 
        // intialize our data items
-       name_prompter = 0 ;
        marker_menu = 0 ;
 
        y_position = -1 ;
@@ -83,7 +82,7 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Canvas&
        label_view() ;
                
        // set the initial height of this time axis
-       set_height(Small) ;
+       set_height(hSmall) ;
 }
 
 /**
@@ -107,14 +106,10 @@ MarkerTimeAxis::~MarkerTimeAxis()
 //---------------------------------------------------------------------------------------//
 // ui methods & data
        
-/**
- * Sets the height of this TrackView to one of the defined TrackHeights
- *
- * @param h the TrackHeight value to set
- */    
 void
-MarkerTimeAxis::set_height (TrackHeight h)
+MarkerTimeAxis::set_height (uint32_t h)
 {
+       bool changed = (height == 0) || (h != height);
        VisualTimeAxis::set_height(h) ;
        
        // tell out view helper of the change too
@@ -123,8 +118,10 @@ MarkerTimeAxis::set_height (TrackHeight h)
                view->set_height((double) height) ;
        }
        
+       if (changed) {
        // tell those interested that we have had our height changed
         gui_changed("track_height",(void*)0) ; /* EMIT_SIGNAL */
+       }
 }
 
 /**