diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 9db4a18ef4..d5bb0aaae6 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -238,7 +238,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr rt) _midnam_custom_device_mode_selector.set_size_request(10, 30); _midnam_custom_device_mode_selector.set_border_width(2); - _midi_controls_box.attach(_midnam_custom_device_mode_selector, 1, 2, 2, 3); + _midi_controls_box.attach(_midnam_custom_device_mode_selector, 0, 1, 3, 4); } else { _midi_controls_box.attach(_channel_selector, 0, 1, 0, 1); } @@ -341,9 +341,14 @@ MidiTimeAxisView::model_changed() _midnam_custom_device_mode_selector.clear_items(); - for (std::list::const_iterator i = device_modes.begin(); - i != device_modes.end(); ++i) { - _midnam_custom_device_mode_selector.append_text(*i); + if (device_modes.size() < 2) { + _midnam_custom_device_mode_selector.hide(); + } else { + _midnam_custom_device_mode_selector.show(); + for (std::list::const_iterator i = device_modes.begin(); + i != device_modes.end(); ++i) { + _midnam_custom_device_mode_selector.append_text(*i); + } } _midnam_custom_device_mode_selector.set_active(0); @@ -369,7 +374,7 @@ void MidiTimeAxisView::set_height (uint32_t h) { if (h >= MIDI_CONTROLS_BOX_MIN_HEIGHT) { - _midi_controls_box.show_all (); + _midi_controls_box.show (); } else { _midi_controls_box.hide(); } diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index 20e1b95714..bae5241f98 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -15,8 +15,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef MIDNAM_PATCH_H_