make tracks visible again
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 12 Sep 2008 09:01:52 +0000 (09:01 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 12 Sep 2008 09:01:52 +0000 (09:01 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@3719 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/audio_time_axis.cc
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/automation_time_axis.h
gtk2_ardour/axis_view.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor_route_list.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/time_axis_view.cc
gtk2_ardour/visual_time_axis.cc
libs/ardour/automatable.cc

index 8eea568b7bfba489d7718ebe8de26cd3b02ea446..124c63936791b9106cf0afa6d4e646c7f0986161 100644 (file)
@@ -92,15 +92,11 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
        mute_button->set_active (false);
        solo_button->set_active (false);
        
-       if (is_audio_track())
-               controls_ebox.set_name ("AudioTimeAxisViewControlsBaseUnselected");
-       else // bus
+       if (is_audio_track()) {
+               controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
+       } else { // bus
                controls_ebox.set_name ("AudioBusControlsBaseUnselected");
-
-       /* map current state of the route */
-
-       processors_changed ();
-       reset_processor_automation_curves ();
+       }
 
        ensure_xml_node ();
 
@@ -108,6 +104,11 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
        
        _route->panner().Changed.connect (bind (mem_fun(*this, &AudioTimeAxisView::update_pans), false));
 
+       /* map current state of the route */
+
+       processors_changed ();
+       reset_processor_automation_curves ();
+       update_pans (false);
        update_control_names ();
 
        if (is_audio_track()) {
@@ -161,6 +162,7 @@ AudioTimeAxisView::hide ()
        TimeAxisView::hide ();
 }
 
+
 void
 AudioTimeAxisView::append_extra_display_menu_items ()
 {
index 36d615453c3251e4b3c74981dceb786d485f9a68..47d0ebe61e698c10e697d122de22f2ecf8d4ae4d 100644 (file)
@@ -376,12 +376,10 @@ void
 AutomationTimeAxisView::set_height (uint32_t h)
 {
        bool changed = (height != (uint32_t) h) || first_call_to_set_height;
-       
-       if (first_call_to_set_height)
-               first_call_to_set_height = false;
        bool changed_between_small_and_normal = ( (h == hSmall || h == hSmaller) ^ (height == hSmall || height == hSmaller) );
 
        TimeAxisView* state_parent = get_parent_with_state ();
+
        assert(state_parent);
        XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter());
 
@@ -401,6 +399,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
        xml_node->add_property ("height", buf);
 
        if (changed_between_small_and_normal || first_call_to_set_height) {
+
                first_call_to_set_height = false;
 
                if (h >= hNormal) {
@@ -912,9 +911,9 @@ void
 AutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
 {
        XMLNode* xml_node = get_state_node();
-//     if (xml_node) {
+       if (xml_node) {
                xml_node->add_property ("shown", editor_shown ? "yes" : "no");
-//     }
+       }
 }
 
 guint32
index fb56c400c746b51494eacebb5af649f6cbf89ef1..8899dc4949b786405ed303a9e0367f58c6568e40 100644 (file)
@@ -71,8 +71,7 @@ class AutomationTimeAxisView : public TimeAxisView {
 
        ~AutomationTimeAxisView();
        
-
-       void set_height (uint32_t);
+       virtual void set_height (uint32_t);
        void set_samples_per_unit (double);
        std::string name() const { return _name; }
 
index 0c57eebfca5da2d1fbea5cb5e05238004ff4ac56..f22b0d2dc7adb3fcd8d89e4033c5659a31ee22b6 100644 (file)
@@ -47,7 +47,7 @@ list<Gdk::Color> AxisView::used_colors;
 AxisView::AxisView (ARDOUR::Session& sess) : _session(sess)
 {
        _selected = false;
-       _marked_for_display = true;
+       _marked_for_display = false;
 }
 
 AxisView::~AxisView()
index 5fe9e000d04c8e044018d7f63c7f34b0997392d3..f8209b8a5644a8d5fc1dc3d5d61b5e4283a89ec3 100644 (file)
@@ -744,6 +744,10 @@ Editor::Editor ()
        vpacker.pack_end (status_bar_hpacker, false, false);
        vpacker.pack_end (global_hpacker, true, true);
 
+       edit_controls_vbox.show ();
+       controls_layout.show ();
+       the_notebook.show_all ();
+
        /* register actions now so that set_state() can find them and set toggles/checks etc */
        
        register_actions ();
index 6213bf9d1e051cc1a550c599a74e576d00840c63..db93f9ffeb9dc09cb7687fb8ad0f3c500a301b6f 100644 (file)
@@ -102,12 +102,14 @@ Editor::handle_new_route (Session::RouteList& routes)
 #else 
                row = *(route_display_model->append ());
 #endif
+
+               cerr << route->name() << " marked for display ? " << tv->marked_for_display() << endl;
                
                row[route_display_columns.text] = route->name();
                row[route_display_columns.visible] = tv->marked_for_display();
                row[route_display_columns.tv] = tv;
                row[route_display_columns.route] = route;
-               
+
                track_views.push_back (tv);
                
                ignore_route_list_reorder = true;
@@ -233,6 +235,7 @@ Editor::update_route_visibility ()
        for (i = rows.begin(); i != rows.end(); ++i) {
                TimeAxisView *tv = (*i)[route_display_columns.tv];
                (*i)[route_display_columns.visible] = tv->marked_for_display ();
+               cerr << "marked " << tv->name() << " for display = " << tv->marked_for_display() << endl;
        }
 
        no_route_list_redisplay = false;
@@ -319,6 +322,8 @@ Editor::redisplay_route_list ()
        uint32_t position;
        uint32_t order;
        int n;
+
+       cerr << "RRL, nrld = " << no_route_list_redisplay << " with " << rows.size() << endl;
        
        if (no_route_list_redisplay) {
                return;
@@ -347,9 +352,12 @@ Editor::redisplay_route_list ()
 
                bool visible = (*i)[route_display_columns.visible];
 
+               cerr << "\tvisible = " << visible << endl;
+
                if (visible) {
                        tv->set_marked_for_display (true);
                        position += tv->show_at (position, n, &edit_controls_vbox);
+                       cerr << "packed tv for " << tv->name() << " @ " << position << endl;
                } else {
                        tv->hide ();
                }
index c98f4c5a0f59167e1542ee7aa900526d7c44b183..1a8949d1b8d719ff5c86400d76d291fa5679b344 100644 (file)
@@ -107,7 +107,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
        input_selector = 0;
        output_selector = 0;
        group_menu = 0;
-       _marked_for_display = false;
+       if (!_route->is_hidden()) {
+               _marked_for_display = true;
+       }
        route_ops_menu = 0;
        ignore_comment_edit = false;
        ignore_toggle = false;
index 82777944f415aac3133d302f697b9410e7b9d59d..f5e1a82a10957a1677acfdf6f84ba4dff87c6d85 100644 (file)
@@ -117,6 +117,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
        playlist_action_menu = 0;
        automation_action_menu = 0;
        _view = 0;
+
+       if (!_route->is_hidden()) {
+               _marked_for_display = true;
+       }
+
        timestretch_rect = 0;
        no_redraw = false;
        destructive_track_mode_item = 0;
@@ -1795,6 +1800,7 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
        using namespace Menu_Helpers;
 
        XMLProperty* prop;
+       XMLNode* node;
 
        add_child (track);
 
@@ -1802,8 +1808,6 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
 
        bool hideit = (!show);
 
-       XMLNode* node;
-
        if ((node = track->get_state_node()) != 0) {
                if  ((prop = node->property ("shown")) != 0) {
                        if (prop->value() == "yes") {
@@ -1811,6 +1815,8 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
                        }
                } 
        }
+
+       cerr << "with show = " << show << " Adding automation child for " << _route->name() << " hideit = " << hideit << " prop = " << prop << endl;
        
        _automation_tracks.insert(std::make_pair(param, new RouteAutomationNode(param, NULL, track)));
 
@@ -1819,6 +1825,7 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom
        } else {
                _show_automation.insert (param);
 
+
                if (!no_redraw) {
                        _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
                }
index 7858b536f89e8bde7d4d3a08ea9abc1925c0c44c..34f8de06dc58f9ae831045b9726446cb31ce9376 100644 (file)
@@ -95,7 +95,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie
        control_parent = 0;
        display_menu = 0;
        size_menu = 0;
-       _marked_for_display = false;
        _hidden = false;
        in_destructor = false;
        height = 0;
index 8a707183cdaa26907687f0ba520d92e23e35d1d4..999f4c81f5ed6a55e4cb64d8743910cc3039f3ef 100644 (file)
@@ -74,7 +74,6 @@ VisualTimeAxis::VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Se
 {
        time_axis_name = name ;
        _color = unique_random_color() ;
-       _marked_for_display = true;
        
        name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
        name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ;
index 3c076c371a58c88ca3d3a26c08887810114bf0ed..cacebe59a476e77e00e41eb1fa70e54d6a870288 100644 (file)
@@ -201,7 +201,8 @@ Automatable::describe_parameter (Parameter param)
        if (param == Parameter(GainAutomation)) {
                return _("Fader");
        } else if (param.type() == PanAutomation) {
-               return (string_compose(_("Pan %1"), param.id()));
+               /* ID's are zero-based, present them as 1-based */
+               return (string_compose(_("Pan %1"), param.id() + 1));
        } else if (param.type() == MidiCCAutomation) {
                return string_compose("CC %1 (%2) [%3]",
                                param.id(), midi_name(param.id()), int(param.channel()) + 1);