13
0

Redraw section markers when reloading session

This fixes a bug that when re-loading a session, section
marker rectangles (to next marker) were not drawn.
This commit is contained in:
Robin Gareus 2024-05-20 21:55:54 +02:00
parent f693c0406a
commit 5fdc7c4601
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -670,7 +670,6 @@ Editor::Editor ()
Location::start_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); Location::start_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context());
Location::end_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); Location::end_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context());
Location::changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context()); Location::changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context());
Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ());
#if SELECTION_PROPERTIES_BOX_TODO #if SELECTION_PROPERTIES_BOX_TODO
add_notebook_page (_("Selection"), *_properties_box); add_notebook_page (_("Selection"), *_properties_box);
@ -1364,6 +1363,7 @@ Editor::set_session (Session *t)
} }
refresh_location_display (); refresh_location_display ();
update_section_rects ();
/* restore rulers before calling set_state() which sets the grid, /* restore rulers before calling set_state() which sets the grid,
* which changes rulers and calls store_ruler_visibility() overriding * which changes rulers and calls store_ruler_visibility() overriding
@ -1411,6 +1411,7 @@ Editor::set_session (Session *t)
_session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context()); _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context());
_session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::loop_location_changed, this, _1), gui_context ()); _session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::loop_location_changed, this, _1), gui_context ());
_session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context()); _session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context());
Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_section_rects, this), gui_context ());
_playhead_cursor->track_canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group()); _playhead_cursor->track_canvas_item().reparent ((ArdourCanvas::Item*) get_cursor_scroll_group());
_playhead_cursor->show (); _playhead_cursor->show ();