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
@ -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::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::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 ());
|
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)
|
EditorSections::location_changed (ARDOUR::Location* l)
|
||||||
{
|
{
|
||||||
if (l->is_section ()) {
|
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
|
void
|
||||||
EditorSections::redisplay ()
|
EditorSections::redisplay ()
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void redisplay ();
|
void redisplay ();
|
||||||
|
void queue_redisplay ();
|
||||||
|
bool idle_redisplay ();
|
||||||
void location_changed (ARDOUR::Location*);
|
void location_changed (ARDOUR::Location*);
|
||||||
bool delete_selected_section ();
|
bool delete_selected_section ();
|
||||||
bool rename_selected_section ();
|
bool rename_selected_section ();
|
||||||
@ -117,6 +119,7 @@ private:
|
|||||||
bool _no_redisplay;
|
bool _no_redisplay;
|
||||||
sigc::connection _scroll_timeout;
|
sigc::connection _scroll_timeout;
|
||||||
sigc::connection _selection_change;
|
sigc::connection _selection_change;
|
||||||
|
sigc::connection _redisplay_connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user