mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
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
2 changed files with 10 additions and 2 deletions
|
|
@ -131,8 +131,13 @@ AutomationLine::AutomationLine (const string& name,
|
||||||
|
|
||||||
AutomationLine::~AutomationLine ()
|
AutomationLine::~AutomationLine ()
|
||||||
{
|
{
|
||||||
vector_delete (&control_points);
|
delete group; // deletes child items
|
||||||
delete group;
|
|
||||||
|
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) {
|
if (_our_time_converter) {
|
||||||
delete _time_converter;
|
delete _time_converter;
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,9 @@ public:
|
||||||
|
|
||||||
ArdourCanvas::Item& item() const;
|
ArdourCanvas::Item& item() const;
|
||||||
|
|
||||||
|
/* used from ~AutomationLine */
|
||||||
|
void unset_item () { _item = 0 ; }
|
||||||
|
|
||||||
ARDOUR::AutomationList::iterator model() const { return _model; }
|
ARDOUR::AutomationList::iterator model() const { return _model; }
|
||||||
AutomationLine& line() const { return _line; }
|
AutomationLine& line() const { return _line; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue