summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-27 13:44:40 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-27 13:44:40 +0000
commita33fe692e649e415a227d5840d708419c2d5255a (patch)
tree5e9bc85b1122cdb03e2138ee6e48bfa48fd825ef /gtk2_ardour/midi_time_axis.cc
parentbd4d67084557f5ca74d917874f74c6c61fb90d49 (diff)
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
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc13
1 files 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