if we don't have control over the device/backend, allow to proceed.
[ardour.git] / gtk2_ardour / route_time_axis.cc
index 29794eb54f3fe52d40d23a5345713cf50dc975ec..8eb4f585326fd735d118e0f220af52ee27c06018 100644 (file)
 #include "ardour/route_group.h"
 #include "ardour/session.h"
 #include "ardour/session_playlists.h"
+
 #include "evoral/Parameter.hpp"
 
+#include "canvas/debug.h"
+
 #include "ardour_ui.h"
 #include "ardour_button.h"
 #include "debug.h"
@@ -111,6 +114,10 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
 {
        RouteUI::set_route (rt);
 
+       CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for %1", rt->name()));
+       CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for %1", rt->name()));
+       CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for %1", rt->name()));
+
        int meter_width = 3;
        if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
                meter_width = 6;
@@ -200,8 +207,10 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
                 controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
         }
 
-       controls_table.attach (route_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
-       controls_table.attach (gm.get_gain_slider(), 0, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::AttachOptions (0), 3, 0);
+       if (!ARDOUR::Profile->get_trx()) {
+               controls_table.attach (route_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
+               controls_table.attach (gm.get_gain_slider(), 0, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::AttachOptions (0), 3, 0);
+       }
 
        ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo"));
        ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute"));
@@ -215,9 +224,11 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
 
        label_view ();
 
-       controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
+       if (!ARDOUR::Profile->get_trx()) {
+               controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
+       }
 
-       if (is_track() && track()->mode() == ARDOUR::Normal) {
+       if (!ARDOUR::Profile->get_trx() && is_track() && track()->mode() == ARDOUR::Normal) {
                controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
        }
 
@@ -718,7 +729,7 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
                _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_track_mode, _1, mode, false));
        } else {
 
-               bool needs_bounce;
+               bool needs_bounce = false;
 
                if (!track()->can_use_mode (mode, needs_bounce)) {
 
@@ -2249,6 +2260,8 @@ RouteTimeAxisView::meter_changed ()
        if (_route && !no_redraw) {
                request_redraw ();
        }
+       // reset peak when meter point changes
+       gm.reset_peak_display();
 }
 
 void