Speed up automation lane removal with many ctrl points
Deleting the group first, directly removes child items without triggering Canvas::item_changed() for every item. This significantly speeds up closing sessions (or deleting tracks) with lots of automation events.
This commit is contained in:
parent
6c72862801
commit
6ada6c553b
|
@ -131,8 +131,13 @@ AutomationLine::AutomationLine (const string& name,
|
|||
|
||||
AutomationLine::~AutomationLine ()
|
||||
{
|
||||
vector_delete (&control_points);
|
||||
delete group;
|
||||
delete group; // deletes child items
|
||||
|
||||
for (std::vector<ControlPoint *>::iterator i = control_points.begin(); i != control_points.end(); i++) {
|
||||
(*i)->unset_item ();
|
||||
delete *i;
|
||||
}
|
||||
control_points.clear ();
|
||||
|
||||
if (_our_time_converter) {
|
||||
delete _time_converter;
|
||||
|
|
|
@ -79,6 +79,9 @@ public:
|
|||
|
||||
ArdourCanvas::Item& item() const;
|
||||
|
||||
/* used from ~AutomationLine */
|
||||
void unset_item () { _item = 0 ; }
|
||||
|
||||
ARDOUR::AutomationList::iterator model() const { return _model; }
|
||||
AutomationLine& line() const { return _line; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue