13
0

Clear mixer scene buttons when closing session

This commit is contained in:
Robin Gareus 2022-06-02 00:52:25 +02:00
parent d79a1aaa98
commit 9ef9277d47
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1234,14 +1234,14 @@ Mixer_UI::set_session (Session* sess)
_group_tabs->set_session (sess);
update_scene_buttons();
if (!_session) {
favorite_plugins_model->clear ();
_selection.clear ();
return;
}
update_scene_buttons();
refill_favorite_plugins();
XMLNode* node = ARDOUR_UI::instance()->mixer_settings();
@ -4138,7 +4138,11 @@ Mixer_UI::update_scene_buttons ()
{
bool all_unset = true;
for (size_t idx = 0; idx < _mixer_scene_buttons.size (); ++idx) {
boost::shared_ptr<MixerScene> scn = _session->nth_mixer_scene (idx);
boost::shared_ptr<MixerScene> scn;
if (_session) {
scn = _session->nth_mixer_scene (idx);
}
Gtk::Label* l = _mixer_scene_labels[idx];
l->set_alignment (0, 0.5);
@ -4153,6 +4157,10 @@ Mixer_UI::update_scene_buttons ()
}
}
if (!_session) {
return;
}
if (_mixer_scene_buttons.size () > 0 && all_unset) {
Gtk::Label* l = _mixer_scene_labels[0];
l->set_markup(string_compose ("<i>%1</i>", _("(Right-Click to Store)")));