[Summary] Bug fix 45141 "Color Palette keeps last selected color when open on new trackheader".

[Reviewed] VKamyshniy
This commit is contained in:
Nikolay 2014-12-29 14:02:32 +02:00
parent f88db6389b
commit fd25ea500e

View file

@ -213,17 +213,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
if (!_session) { if (!_session) {
return; return;
} }
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
if (act) {
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
if (!tact || !tact->get_active()) {
/* not showing mixer strip presently */
return;
}
}
if (current_mixer_strip == 0) { if (current_mixer_strip == 0) {
create_editor_mixer (); create_editor_mixer ();
} }
@ -257,10 +247,18 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
} }
} }
if (route && (current_mixer_strip->route() != route)) { Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
current_mixer_strip->set_route (route);
if (act) {
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::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 ()) { if (route && !route->is_master ()) {
ARDOUR_UI::instance()->update_track_color_dialog (route); ARDOUR_UI::instance()->update_track_color_dialog (route);
} else { } else {