mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Another speedup when multiple locations change
This is mainly relevant for redo, and ripple when all multiple locations are changed and static signals are emitted by each Location.
This commit is contained in:
parent
857d8096a9
commit
62f20d126f
2 changed files with 20 additions and 2 deletions
|
|
@ -102,7 +102,7 @@ EditorSections::set_session (Session* s)
|
|||
|
||||
Location::start_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ());
|
||||
Location::end_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ());
|
||||
Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::redisplay, this), gui_context ());
|
||||
Location::flags_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::queue_redisplay, this), gui_context ());
|
||||
Location::name_changed.connect (_session_connections, invalidator (*this), boost::bind (&EditorSections::location_changed, this, _1), gui_context ());
|
||||
}
|
||||
|
||||
|
|
@ -122,10 +122,25 @@ void
|
|||
EditorSections::location_changed (ARDOUR::Location* l)
|
||||
{
|
||||
if (l->is_section ()) {
|
||||
redisplay ();
|
||||
queue_redisplay ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
EditorSections::queue_redisplay ()
|
||||
{
|
||||
if (!_redisplay_connection.connected ()) {
|
||||
_redisplay_connection = Glib::signal_idle().connect (sigc::mem_fun (*this, &EditorSections::idle_redisplay), Glib::PRIORITY_HIGH_IDLE+10);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
EditorSections::idle_redisplay ()
|
||||
{
|
||||
redisplay ();
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
EditorSections::redisplay ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ public:
|
|||
|
||||
private:
|
||||
void redisplay ();
|
||||
void queue_redisplay ();
|
||||
bool idle_redisplay ();
|
||||
void location_changed (ARDOUR::Location*);
|
||||
bool delete_selected_section ();
|
||||
bool rename_selected_section ();
|
||||
|
|
@ -117,6 +119,7 @@ private:
|
|||
bool _no_redisplay;
|
||||
sigc::connection _scroll_timeout;
|
||||
sigc::connection _selection_change;
|
||||
sigc::connection _redisplay_connection;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue