summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/midi_time_axis.cc16
-rw-r--r--gtk2_ardour/midi_time_axis.h1
2 files changed, 11 insertions, 6 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 2b6827a5c4..888bf3ee02 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -274,12 +274,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
_midi_controls_box.set_homogeneous(false);
_midi_controls_box.set_border_width (2);
- MIDI::Name::MidiPatchManager::instance().PatchesChanged.connect (*this, invalidator (*this),
- boost::bind (&MidiTimeAxisView::setup_midnam_patches, this),
- gui_context());
-
- setup_midnam_patches ();
- update_patch_selector ();
+ MIDI::Name::MidiPatchManager::instance().maybe_use (*this, invalidator (*this), boost::bind (&MidiTimeAxisView::use_midnam_info, this), gui_context());
model_changed (gui_property(X_("midnam-model-name")));
custom_device_mode_changed (gui_property(X_("midnam-custom-device-mode")));
@@ -359,6 +354,15 @@ MidiTimeAxisView::check_step_edit ()
_step_editor->check_step_edit ();
}
+
+void
+MidiTimeAxisView::use_midnam_info ()
+{
+ std::cerr << "Using MIDNAM info from " << pthread_name() << endl;
+ setup_midnam_patches ();
+ update_patch_selector ();
+}
+
void
MidiTimeAxisView::setup_midnam_patches ()
{
diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h
index 585791e53b..ee36d4c534 100644
--- a/gtk2_ardour/midi_time_axis.h
+++ b/gtk2_ardour/midi_time_axis.h
@@ -112,6 +112,7 @@ public:
uint8_t get_channel_for_add () const;
void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Temporal::Beats> > > > >&);
+ void use_midnam_info ();
protected:
void start_step_editing ();