diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-15 14:37:08 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-15 14:37:08 +0000 |
commit | 3254468526441d82134d49fd8c01305c4c362851 (patch) | |
tree | 9c53f5af801a09a91fe4956a5867004f72ce62cc /gtk2_ardour/selection.cc | |
parent | 5e7ead224a036fc5ff9212cab615cd16f6f5aa84 (diff) |
fix crash caused when deleting a region without a playlist PLUS make it impossible to select a region without a playlist (i.e. part of an unfinished capture pass). fixes #1502
git-svn-id: svn://localhost/ardour2/branches/3.0@7779 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 7735993bc1..886dffb651 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -436,11 +436,13 @@ void Selection::add (RegionView* r) { if (find (regions.begin(), regions.end(), r) == regions.end()) { - regions.add (r); - if (Config->get_link_region_and_track_selection()) { - add (&r->get_time_axis_view()); - } - RegionsChanged (); + bool changed = regions.add (r); + if (Config->get_link_region_and_track_selection() && changed) { + add (&r->get_time_axis_view()); + } + if (changed) { + RegionsChanged (); + } } } |