summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-09 03:07:43 +0200
committerRobin Gareus <robin@gareus.org>2017-09-09 03:08:46 +0200
commit2513343204b5fb1256b15bce2058fcfd52d9432a (patch)
tree13df86cb0058a029a5b0a90648762cf04de178aa /gtk2_ardour/midi_time_axis.cc
parent7872e4033f236356f0b5a10d0a4eb889adca52d2 (diff)
GUI part of LV2 midnam race condition fix
..and support for midnam patches on MIDI Busses.
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 3627074bc8..c8476dc83e 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -427,6 +427,7 @@ MidiTimeAxisView::update_patch_selector ()
pi->plugin()->UpdateMidnam.connect (midnam_connection, invalidator (*this),
boost::bind (&MidiTimeAxisView::reread_midnam, this),
gui_context());
+ reread_midnam ();
pluginprovided = true;
std::string model_name = pi->plugin ()->midnam_model ();
@@ -450,9 +451,9 @@ MidiTimeAxisView::reread_midnam ()
{
boost::shared_ptr<Processor> the_instrument (_route->the_instrument());
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert>(the_instrument);
- pi->plugin ()->read_midnam();
+ bool rv = pi->plugin ()->read_midnam();
- if (_patch_change_dialog) {
+ if (rv && _patch_change_dialog) {
_patch_change_dialog->refresh ();
}
}