diff options
author | Robin Gareus <robin@gareus.org> | 2019-02-15 21:37:19 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-02-15 21:37:19 +0100 |
commit | 1d6ee0b7e220d49b5f181d364e9154c4a0734121 (patch) | |
tree | 6913023fda25a016448addacb0839c65242a2b7d /gtk2_ardour/region_gain_line.cc | |
parent | a858f199a11ef657a8f0dfa6102abb6cbab7391b (diff) |
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.
Diffstat (limited to 'gtk2_ardour/region_gain_line.cc')
-rw-r--r-- | gtk2_ardour/region_gain_line.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc index 134809c9e5..9fae44636c 100644 --- a/gtk2_ardour/region_gain_line.cc +++ b/gtk2_ardour/region_gain_line.cc @@ -110,4 +110,12 @@ AudioRegionGainLine::region_changed (const PropertyChange& what_changed) if (what_changed.contains (interesting_stuff)) { _time_converter->set_origin_b (rv.region()->position()); } + + interesting_stuff.clear (); + interesting_stuff.add (ARDOUR::Properties::start); + interesting_stuff.add (ARDOUR::Properties::length); + + if (what_changed.contains (interesting_stuff)) { + reset (); + } } |