summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index f6d2993cfe..5802cc7e20 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -396,15 +396,19 @@ MidiTimeAxisView::route_active_changed ()
void
MidiTimeAxisView::channel_selector_toggled()
{
- static TimeAxisView::TrackHeight previous_height;
+ static uint32_t previous_height;
if(_midi_expander.property_expanded()) {
- previous_height = height_style;
- if(previous_height != TimeAxisView::Largest) {
- set_height(TimeAxisView::Large);
+
+ previous_height = current_height();
+
+ if (previous_height < TimeAxisView::hLargest) {
+ set_height (TimeAxisView::hLarge);
}
+
} else {
- set_height(previous_height);
+
+ set_height (previous_height);
}
}