summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-12-23 10:26:33 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-12-23 10:27:00 -0700
commit799ec6a8f133c58a86e0173f4c50490ccc31a9c2 (patch)
treed995bf8905f27c72cb3e153b1581113a7a796dce /gtk2_ardour/midi_time_axis.cc
parent61aeb05f2ee244a2af2c5656fe73391f1209b138 (diff)
use new method in MidiPatchManager to use MIDNAM data when setting a MidiTimeAxisView
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc16
1 files changed, 10 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 ()
{