From 857d8096a989bd82261e2d4ea86a70067dcf8e6c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 8 Dec 2023 22:12:48 +0100 Subject: [PATCH] Revert "Keep Location List ordered by start-time" This reverts commit 67f6363dcd8674d1dee5fbcca4056f8d22cb6e1a. This VERY slow when there are many locations in the session e.g. with #9568 it can take seconds. --- gtk2_ardour/location_ui.cc | 16 +--------------- gtk2_ardour/location_ui.h | 3 --- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 29f9c29ecc..d3eb19554b 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -352,6 +352,7 @@ LocationEditRow::set_location (Location *loc) /* connect to per-location signals, since this row only cares about this location */ location->NameChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::name_changed, this), gui_context()); + location->StartChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::start_changed, this), gui_context()); location->EndChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::end_changed, this), gui_context()); location->Changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::location_changed, this), gui_context()); location->FlagsChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::flags_changed, this), gui_context()); @@ -889,20 +890,6 @@ LocationUI::location_remove_requested (ARDOUR::Location *loc) Glib::signal_idle().connect (sigc::bind (sigc::mem_fun(*this, &LocationUI::do_location_remove), loc)); } -void -LocationUI::queue_refresh_location_list () -{ - if (!_redisplay_connection.connected ()) { - _redisplay_connection = Glib::signal_idle().connect (sigc::mem_fun (*this, &LocationUI::idle_refresh_location_list), Glib::PRIORITY_HIGH_IDLE+10); - } -} - -bool -LocationUI::idle_refresh_location_list () -{ - refresh_location_list (); - return false; -} void LocationUI::location_redraw_ranges () @@ -1110,7 +1097,6 @@ LocationUI::set_session(ARDOUR::Session* s) _session->locations()->added.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::location_added, this, _1), gui_context()); _session->locations()->removed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::location_removed, this, _1), gui_context()); _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::refresh_location_list, this), gui_context()); - Location::start_changed.connect (_session_connections, invalidator (*this), boost::bind (&LocationUI::queue_refresh_location_list, this), gui_context()); _clock_group->set_clock_mode (clock_mode_from_session_instant_xml ()); } else { diff --git a/gtk2_ardour/location_ui.h b/gtk2_ardour/location_ui.h index 9ac00f3e4e..5c9368bc76 100644 --- a/gtk2_ardour/location_ui.h +++ b/gtk2_ardour/location_ui.h @@ -202,9 +202,6 @@ private: void location_remove_requested (ARDOUR::Location *); void location_redraw_ranges (); - void queue_refresh_location_list (); - bool idle_refresh_location_list (); - sigc::connection _redisplay_connection; gint do_location_remove (ARDOUR::Location *);