Fix crash when touching stale Automation Points
authorRobin Gareus <robin@gareus.org>
Fri, 15 Feb 2019 20:37:19 +0000 (21:37 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 15 Feb 2019 20:37:19 +0000 (21:37 +0100)
commit1d6ee0b7e220d49b5f181d364e9154c4a0734121
tree6913023fda25a016448addacb0839c65242a2b7d
parenta858f199a11ef657a8f0dfa6102abb6cbab7391b
Fix crash when touching stale Automation Points

Undo/Redo allows to change a region's envelope without the envelope-list
changing (AutomationList::StateChanged is not emitted).

This also catches other operations where region-length can change while
the Envelope is visible. -- Normally when using the range or object tool
to modify a Region, the Envelope is not visible.

Without this change it was possible that the GUI shows automation
points that don't have a corresponding libardour representation:

e.g. select range, change tool to "draw", press "s" (split), undo,
click on any region-gain point.
gtk2_ardour/region_gain_line.cc