Hide MIDI device mode selector unless there is actually more than one mode.
Since this is usually not the case, showing this all the time as before was so confusing everyone thought it was broken (myself included). Changing that show_all() to a show() might have consequences, but it seems to work fine and we really shouldn't be using show_all() anyway. git-svn-id: svn://localhost/ardour2/branches/3.0@13889 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
458b5c1d48
commit
94c7798712
@ -238,7 +238,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> 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,10 +341,15 @@ MidiTimeAxisView::model_changed()
|
||||
|
||||
_midnam_custom_device_mode_selector.clear_items();
|
||||
|
||||
if (device_modes.size() < 2) {
|
||||
_midnam_custom_device_mode_selector.hide();
|
||||
} else {
|
||||
_midnam_custom_device_mode_selector.show();
|
||||
for (std::list<std::string>::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();
|
||||
}
|
||||
|
@ -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_
|
||||
|
Loading…
Reference in New Issue
Block a user