From 1d6ee0b7e220d49b5f181d364e9154c4a0734121 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 15 Feb 2019 21:37:19 +0100 Subject: 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 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gtk2_ardour') 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 (); + } } -- cgit v1.2.3