diff options
author | Carl Hetherington <carl@carlh.net> | 2010-05-11 00:09:41 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-05-11 00:09:41 +0000 |
commit | 7e6014a07759c93dc3c4f65456eb1fd2b4a7dc3a (patch) | |
tree | f9f5e7e83646e4676e2fc432a8aadeba5e9fe63a /gtk2_ardour/automation_time_axis.cc | |
parent | 37a34bb8b0568ad28fa6c3697a2eab296b0af7ae (diff) |
Fix track height menu.
git-svn-id: svn://localhost/ardour2/branches/3.0@7093 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index d40f5e3405..d2b43d33f9 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -381,10 +381,9 @@ AutomationTimeAxisView::clear_clicked () void AutomationTimeAxisView::set_height (uint32_t h) { - bool changed = (height != (uint32_t) h) || first_call_to_set_height; - bool changed_between_small_and_normal = ( - (height < hNormal && h >= hNormal) - || (height >= hNormal || h < hNormal) ); + bool const changed = (height != (uint32_t) h) || first_call_to_set_height; + uint32_t const normal = preset_height (HeightNormal); + bool const changed_between_small_and_normal = ( (height < normal && h >= normal) || (height >= normal || h < normal) ); TimeAxisView* state_parent = get_parent_with_state (); assert(state_parent); @@ -411,7 +410,7 @@ AutomationTimeAxisView::set_height (uint32_t h) first_call_to_set_height = false; - if (h >= hNormal) { + if (h >= preset_height (HeightNormal)) { controls_table.remove (name_hbox); if (plugname) { @@ -432,7 +431,7 @@ AutomationTimeAxisView::set_height (uint32_t h) auto_button.show(); hide_button.show_all(); - } else if (h >= hSmall) { + } else if (h >= preset_height (HeightSmall)) { controls_table.remove (name_hbox); if (plugname) { if (plugname_packed) { @@ -449,7 +448,7 @@ AutomationTimeAxisView::set_height (uint32_t h) auto_button.hide(); hide_button.hide(); } - } else if (h >= hNormal){ + } else if (h >= preset_height (HeightNormal)) { cerr << "track grown, but neither changed_between_small_and_normal nor first_call_to_set_height set!" << endl; } |