From fd25ea500eba942e520c41f17cf0e075eb62f0d1 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Mon, 29 Dec 2014 14:02:32 +0200 Subject: [PATCH] [Summary] Bug fix 45141 "Color Palette keeps last selected color when open on new trackheader". [Reviewed] VKamyshniy --- gtk2_ardour/editor_mixer.cc | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 88f4b2665a..807f058d17 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -213,17 +213,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) if (!_session) { return; } - - Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer")); - - if (act) { - Glib::RefPtr tact = Glib::RefPtr::cast_dynamic(act); - if (!tact || !tact->get_active()) { - /* not showing mixer strip presently */ - return; - } - } - + if (current_mixer_strip == 0) { create_editor_mixer (); } @@ -257,10 +247,18 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) } } - if (route && (current_mixer_strip->route() != route)) { - current_mixer_strip->set_route (route); + Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer")); + + if (act) { + Glib::RefPtr tact = Glib::RefPtr::cast_dynamic(act); + + if ( tact && tact->get_active() ) { // if inspector is visible + if (route && (current_mixer_strip->route() != route)) { + current_mixer_strip->set_route (route); + } + } } - + if (route && !route->is_master ()) { ARDOUR_UI::instance()->update_track_color_dialog (route); } else {