Redisplay list editor when the region is moved or resize

Using connection list to not overwrite the previous connection
This commit is contained in:
Nil Geisweiller 2020-03-26 23:30:32 +02:00
parent 95b00315c0
commit ba31151c42
2 changed files with 5 additions and 3 deletions

View File

@ -148,8 +148,10 @@ MidiListEditor::MidiListEditor (Session* s, boost::shared_ptr<MidiRegion> r, boo
redisplay_model ();
region->midi_source(0)->model()->ContentsChanged.connect (content_connection, invalidator (*this),
boost::bind (&MidiListEditor::redisplay_model, this), gui_context());
region->midi_source(0)->model()->ContentsChanged.connect (content_connections, invalidator (*this),
boost::bind (&MidiListEditor::redisplay_model, this), gui_context());
region->RegionPropertyChanged.connect (content_connections, invalidator (*this),
boost::bind (&MidiListEditor::redisplay_model, this), gui_context());
buttons.attach (sound_notes_button, 0, 1, 0, 1);
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action ("Editor", "sound-midi-notes");

View File

@ -100,7 +100,7 @@ private:
boost::shared_ptr<ARDOUR::MidiTrack> track;
/** connection used to connect to model's ContentChanged signal */
PBD::ScopedConnection content_connection;
PBD::ScopedConnectionList content_connections;
void edited (const std::string&, const std::string&);
void editing_started (Gtk::CellEditable*, const std::string& path, int);