- _midnam_custom_device_mode_selector.set_active(0);
-
- _route->instrument_info().set_external_instrument (
- _midnam_model_selector.get_active_text(),
- _midnam_custom_device_mode_selector.get_active_text());
+ if (!device_modes.empty()) {
+ custom_device_mode_changed(device_modes.front());
+ }
+
+ if (device_modes.size() > 1) {
+ _midnam_custom_device_mode_selector.show();
+ } else {
+ _midnam_custom_device_mode_selector.hide();
+ }
+
+ _route->instrument_info().set_external_instrument (model, device_modes.front());