editor mixer visibility now restored correctly
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 2 Nov 2006 19:18:50 +0000 (19:18 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 2 Nov 2006 19:18:50 +0000 (19:18 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1061 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_mixer.cc
gtk2_ardour/editor_route_list.cc

index 76731ea439a188918e32a3c6384692bb4bb35d0c..68177a11183cc7076ba3dfc1da64650d150c5a55 100644 (file)
@@ -288,6 +288,7 @@ Editor::Editor (AudioEngine& eng)
        transport_marker_menu = 0;
        new_transport_marker_menu = 0;
        editor_mixer_strip_width = Wide;
+       show_editor_mixer_when_tracks_arrive = false;
        repos_zoom_queued = false;
        region_edit_menu_split_item = 0;
        temp_location = 0;
@@ -2156,6 +2157,7 @@ Editor::set_state (const XMLNode& node)
 
                Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
                if (act) {
+
                        Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
                        bool yn = (prop->value() == X_("yes"));
 
index 34a9573cca9aeb8638235aee52055de255b9451f..0117d364f110f397792e4139e0c28e263b599b37 100644 (file)
@@ -1665,6 +1665,7 @@ class Editor : public PublicEditor
        /* editor-mixer strip */
 
        MixerStrip *current_mixer_strip;
+       bool show_editor_mixer_when_tracks_arrive;
        Gtk::VBox current_mixer_strip_vbox;
        void cms_deleted ();
        void current_mixer_strip_hidden ();
index cd951a9d62ca0c41c0a34b0c5fb9cf9da4d09c5d..38899a7e3a137a34f7d136fb6fcc0b4a6b4495fb 100644 (file)
@@ -49,15 +49,18 @@ Editor::cms_deleted ()
 void
 Editor::show_editor_mixer (bool yn)
 {
+       show_editor_mixer_when_tracks_arrive = true;
+
        if (yn) {
 
                if (current_mixer_strip == 0) {
 
                        if (selection->tracks.empty()) {
                                
-                               if (track_views.empty()) {
+                               if (track_views.empty()) {      
+                                       show_editor_mixer_when_tracks_arrive = true;
                                        return;
-                               }
+                               } 
                                
                                for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
                                        AudioTimeAxisView* atv;
index 573dec0fd5e78835eb60beedf9701fa858cbfc07..3e2f1306912e0b49cf95da54a879dacf73e78f02 100644 (file)
@@ -109,6 +109,10 @@ Editor::handle_new_route (Session::RouteList& routes)
                tv->GoingAway.connect (bind (mem_fun(*this, &Editor::remove_route), tv));
        }
 
+       if (show_editor_mixer_when_tracks_arrive) {
+               show_editor_mixer (true);
+       }
+
        editor_mixer_button.set_sensitive(true);
 }