From 9deee4df7cda3e54f986c4f50270da83f097f70a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 4 May 2025 19:21:35 -0600 Subject: [PATCH] better tracking of lower pane content visibility based on region selection --- gtk2_ardour/editor.cc | 1 - gtk2_ardour/editor_selection.cc | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index c794b8dd45..8161bf896c 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1260,7 +1260,6 @@ Editor::set_session (Session *t) } _pianoroll->set_session (_session); - _bottom_hbox.pack_start(*_properties_box, true, true); /* _pianoroll is packed on demand in Editor::region_selection_changed */ _bottom_hbox.show_all(); diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 5a24bd29ae..38e203d03c 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1730,16 +1730,21 @@ Editor::region_selection_changed () } } } + Gtkmm2ext::container_clear (_bottom_hbox); + if (pack_pianoroll) { _bottom_hbox.pack_start(*_properties_box, false, false); _bottom_hbox.pack_start(_pianoroll->contents(), true, true); _pianoroll->contents().hide (); _pianoroll->contents().show_all (); + _properties_box->show (); } else { - _bottom_hbox.pack_start(*_properties_box, true, true); + if (!selection->regions.empty()) { + _bottom_hbox.pack_start(*_properties_box, true, true); + _properties_box->show (); + } } - _properties_box->show (); } void