13
0

Make AutomationLists clear their events when their state is set to an AutomationList with no Events node. Fixes #3345.

git-svn-id: svn://localhost/ardour2/branches/3.0@7456 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-07-20 23:25:02 +00:00
parent f14604694d
commit f9d88d0979

View File

@ -448,12 +448,25 @@ AutomationList::set_state (const XMLNode& node, int version)
_max_xval = 0; // means "no limit ;
}
bool have_events = false;
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == X_("events")) {
deserialize_events (*(*niter));
have_events = true;
}
}
if (!have_events) {
/* there was no Events child node; clear any current events */
freeze ();
clear ();
mark_dirty ();
reposition_for_rt_add (0);
maybe_signal_changed ();
thaw ();
}
return 0;
}