From 5fdc7c46013a94fcc9149819fcd3d190aab6a2ac Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 May 2024 21:55:54 +0200 Subject: [PATCH] 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. --- gtk2_ardour/editor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 69e5078a66..5ed96c63f2 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -670,7 +670,6 @@ Editor::Editor () 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::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 add_notebook_page (_("Selection"), *_properties_box); @@ -1364,6 +1363,7 @@ Editor::set_session (Session *t) } refresh_location_display (); + update_section_rects (); /* restore rulers before calling set_state() which sets the grid, * 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->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()); + 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->show ();