Don't update bottom attachment when it's not visible

This commit is contained in:
Robin Gareus
2025-08-24 15:06:16 +02:00
parent 32325e84d7
commit 4e78f25149
2 changed files with 22 additions and 1 deletions

View File

@@ -121,6 +121,24 @@ SelectionPropertiesBox::track_mouse_mode ()
/* maybe do something here? */
}
void
SelectionPropertiesBox::on_map ()
{
HBox::on_map ();
SelectionPropertiesBox::selection_changed ();
}
void
SelectionPropertiesBox::on_unmap ()
{
/* This also triggers when switching pages, or hiding the GUI
* perhaps consider show/hide get_visible() instead.
*/
HBox::on_unmap ();
SelectionPropertiesBox::selection_changed ();
_route_prop_box->set_route (std::shared_ptr<Route>());
}
void
SelectionPropertiesBox::delete_region_editor ()
{
@@ -140,7 +158,7 @@ SelectionPropertiesBox::delete_region_editor ()
void
SelectionPropertiesBox::selection_changed ()
{
if (!_session || _session->inital_connect_or_deletion_in_progress ()) {
if (!_session || _session->inital_connect_or_deletion_in_progress () || !get_mapped ()) {
_time_info_box->hide ();
_route_prop_box->hide ();
_slot_prop_box->hide ();

View File

@@ -58,6 +58,9 @@ private:
void track_mouse_mode ();
void delete_region_editor ();
void on_map ();
void on_unmap ();
TimeInfoBox* _time_info_box;
RoutePropertiesBox* _route_prop_box;
SlotPropertiesBox* _slot_prop_box;