diff options
author | David Robillard <d@drobilla.net> | 2014-11-13 21:32:08 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-13 21:32:08 -0500 |
commit | 589cc3162bb1bcae4d140f1314fc7b4138eaac98 (patch) | |
tree | 628a3106cd4053a7d7dad54979d410fe2ce9ef48 /gtk2_ardour/midi_selection.cc | |
parent | 4ba4677b4538c551e000dcae1289f966a4b07c26 (diff) |
Fix crash when deleting overlapped regions.
Use RegionSelection for MIDI regions as well, since the old dumb stub didn't do
some things correctly. There's probably no reason to have a separate class for
this at all, and some good ones for putting all regions in the same selection,
so we should probably do that. For now they are still separate in the
selection but use the same base class.
Diffstat (limited to 'gtk2_ardour/midi_selection.cc')
-rw-r--r-- | gtk2_ardour/midi_selection.cc | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/gtk2_ardour/midi_selection.cc b/gtk2_ardour/midi_selection.cc index bf9b88899b..f98f696444 100644 --- a/gtk2_ardour/midi_selection.cc +++ b/gtk2_ardour/midi_selection.cc @@ -17,29 +17,19 @@ */ -#include "gtkmm2ext/gui_thread.h" -#include "midi_region_view.h" #include "midi_selection.h" -#include "region_view.h" MidiRegionSelection::MidiRegionSelection () -{ - RegionView::RegionViewGoingAway.connect (_death_connection, MISSING_INVALIDATOR, boost::bind (&MidiRegionSelection::remove_it, this, _1), gui_context()); -} + : RegionSelection () +{} -/** Copy constructor. - * @param other MidiRegionSelection to copy. - */ MidiRegionSelection::MidiRegionSelection (MidiRegionSelection const & other) - : std::list<MidiRegionView*> (other) -{ - RegionView::RegionViewGoingAway.connect (_death_connection, MISSING_INVALIDATOR, boost::bind (&MidiRegionSelection::remove_it, this, _1), gui_context()); -} - + : RegionSelection (other) +{} -void -MidiRegionSelection::remove_it (RegionView* rv) +MidiRegionSelection& +MidiRegionSelection::operator= (const MidiRegionSelection& other) { - MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (rv); - remove (mrv); + RegionSelection::operator=(other); + return *this; } |