diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 5300a82574..682f02365c 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -268,10 +268,6 @@ MidiRegionView::init (bool wfd) { PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys)); - NoteBase::NoteBaseDeleted.connect (note_delete_connection, MISSING_INVALIDATOR, - boost::bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1), - gui_context()); - if (wfd) { Glib::Threads::Mutex::Lock lm(midi_region()->midi_source(0)->mutex()); midi_region()->midi_source(0)->load_model(lm); @@ -1384,8 +1380,6 @@ MidiRegionView::~MidiRegionView () hide_verbose_cursor (); - note_delete_connection.disconnect (); - delete _list_editor; RegionViewGoingAway (this); /* EMIT_SIGNAL */ @@ -2098,7 +2092,7 @@ MidiRegionView::step_patch (PatchChange& patch, bool bank, int delta) } void -MidiRegionView::maybe_remove_deleted_note_from_selection (NoteBase* cne) +MidiRegionView::note_deleted (NoteBase* cne) { if (_selection.empty()) { return; diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index 786a7ec7c4..05d5df98f9 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -332,6 +332,8 @@ public: ARDOUR::InstrumentInfo& instrument_info() const; + void note_deleted (NoteBase*); + protected: void region_resized (const PBD::PropertyChange&); @@ -471,9 +473,6 @@ private: MidiListEditor* _list_editor; bool _no_sound_notes; - PBD::ScopedConnection note_delete_connection; - void maybe_remove_deleted_note_from_selection (NoteBase*); - void snap_changed (); PBD::ScopedConnection snap_changed_connection; diff --git a/gtk2_ardour/note_base.cc b/gtk2_ardour/note_base.cc index 228a6dead7..feee7e7d7c 100644 --- a/gtk2_ardour/note_base.cc +++ b/gtk2_ardour/note_base.cc @@ -36,8 +36,6 @@ using namespace Gtkmm2ext; using ARDOUR::MidiModel; using namespace ArdourCanvas; -PBD::Signal1 NoteBase::NoteBaseDeleted; - /// dividing the hue circle in 16 parts, hand adjusted for equal look, courtesy Thorsten Wilms const uint32_t NoteBase::midi_channel_colors[16] = { 0xd32d2dff, 0xd36b2dff, 0xd3972dff, 0xd3d12dff, @@ -62,7 +60,7 @@ NoteBase::NoteBase(MidiRegionView& region, bool with_events, const boost::shared NoteBase::~NoteBase() { - NoteBaseDeleted (this); + _region.note_deleted (this); delete _text; } diff --git a/gtk2_ardour/note_base.h b/gtk2_ardour/note_base.h index e63e59b84b..1e94e709a3 100644 --- a/gtk2_ardour/note_base.h +++ b/gtk2_ardour/note_base.h @@ -61,8 +61,6 @@ class NoteBase : public sigc::trackable void set_item (ArdourCanvas::Item *); ArdourCanvas::Item* item() const { return _item; } - static PBD::Signal1 NoteBaseDeleted; - virtual void show() = 0; virtual void hide() = 0;