From a33fe692e649e415a227d5840d708419c2d5255a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 27 Nov 2011 13:44:40 +0000 Subject: [PATCH] Fix partial visibility of piano roll when changing MIDI track height in various ways (#2842, #3904). git-svn-id: svn://localhost/ardour2/branches/3.0@10827 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_time_axis.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 12125ef3f5..e9b9ee3f2d 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -326,15 +326,13 @@ MidiTimeAxisView::midi_view() void MidiTimeAxisView::set_height (uint32_t h) { - RouteTimeAxisView::set_height (h); - - if (height >= MIDI_CONTROLS_BOX_MIN_HEIGHT) { + if (h >= MIDI_CONTROLS_BOX_MIN_HEIGHT) { _midi_controls_box.show_all (); } else { _midi_controls_box.hide(); } - if (height >= KEYBOARD_MIN_HEIGHT) { + if (h >= KEYBOARD_MIN_HEIGHT) { if (is_track() && _range_scroomer) { _range_scroomer->show(); } @@ -349,6 +347,13 @@ MidiTimeAxisView::set_height (uint32_t h) _piano_roll_header->hide(); } } + + /* We need to do this after changing visibility of our stuff, as it will + eventually trigger a call to Editor::reset_controls_layout_width(), + which needs to know if we have just shown or hidden a scroomer / + piano roll. + */ + RouteTimeAxisView::set_height (h); } void