c&p debug
[ardour.git] / gtk2_ardour / route_time_axis.cc
index b6cea2a11afaaf821c255b5254db11c1dd766765..73dcf5d9a37a28677112594ce32bcb8595042432 100644 (file)
@@ -61,6 +61,7 @@
 #include "evoral/Parameter.hpp"
 
 #include "ardour_ui.h"
+#include "debug.h"
 #include "global_signals.h"
 #include "route_time_axis.h"
 #include "automation_time_axis.h"
@@ -321,6 +322,10 @@ RouteTimeAxisView::label_view ()
                name_entry.set_text (x);
        }
 
+       if (x != name_label.get_text()) {
+               name_label.set_text (x);
+       }
+
        ARDOUR_UI::instance()->set_tip (name_entry, x);
 }
 
@@ -334,7 +339,6 @@ RouteTimeAxisView::route_property_changed (const PropertyChange& what_changed)
 
 void
 RouteTimeAxisView::take_name_changed (void *src)
-
 {
        if (src != this) {
                label_view ();
@@ -439,6 +443,9 @@ RouteTimeAxisView::build_display_menu ()
 
        items.push_back (MenuElem (_("Color..."), sigc::mem_fun(*this, &RouteTimeAxisView::select_track_color)));
 
+       build_size_menu ();
+       items.push_back (MenuElem (_("Height"), *_size_menu));
+
        items.push_back (SeparatorElem());
 
        if (!Profile->get_sae()) {
@@ -452,7 +459,6 @@ RouteTimeAxisView::build_display_menu ()
 
        // Hook for derived classes to add type specific stuff
        append_extra_display_menu_items ();
-       items.push_back (SeparatorElem());
 
        if (is_track()) {
 
@@ -1391,8 +1397,11 @@ RouteTimeAxisView::paste (framepos_t pos, float times, Selection& selection, siz
                return false;
        }
 
+        DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("paste to %1\n", pos));
+
        if (track()->speed() != 1.0f) {
                pos = session_frame_to_track_frame (pos, track()->speed());
+                DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("modified paste to %1\n", pos));
        }
 
         pl->clear_changes ();
@@ -1751,13 +1760,11 @@ void
 RouteTimeAxisView::region_view_added (RegionView* rv)
 {
        /* XXX need to find out if automation children have automationstreamviews. If yes, no ghosts */
-       if (is_audio_track()) {
-               for (Children::iterator i = children.begin(); i != children.end(); ++i) {
-                       boost::shared_ptr<AutomationTimeAxisView> atv;
-
-                       if ((atv = boost::dynamic_pointer_cast<AutomationTimeAxisView> (*i)) != 0) {
-                               atv->add_ghost(rv);
-                       }
+       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
+               boost::shared_ptr<AutomationTimeAxisView> atv;
+               
+               if ((atv = boost::dynamic_pointer_cast<AutomationTimeAxisView> (*i)) != 0) {
+                       atv->add_ghost(rv);
                }
        }
 
@@ -1857,8 +1864,8 @@ RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor>
                        = boost::dynamic_pointer_cast<AutomationControl>(processor->control(what, true));
 
        pan->view = boost::shared_ptr<AutomationTimeAxisView>(
-                       new AutomationTimeAxisView (_session, _route, processor, control,
-                               _editor, *this, false, parent_canvas, name, state_name));
+               new AutomationTimeAxisView (_session, _route, processor, control, control->parameter (),
+                                           _editor, *this, false, parent_canvas, name, state_name));
 
        pan->view->Hiding.connect (sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::processor_automation_track_hidden), pan, processor));
 
@@ -2403,7 +2410,7 @@ RouteTimeAxisView::create_gain_automation_child (const Evoral::Parameter& param,
        }
 
        gain_track.reset (new AutomationTimeAxisView (_session,
-                                                     _route, _route->amp(), c,
+                                                     _route, _route->amp(), c, param,
                                                      _editor,
                                                      *this,
                                                      false,