diff options
author | Carl Hetherington <carl@carlh.net> | 2010-11-10 21:56:32 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-11-10 21:56:32 +0000 |
commit | b8da7d196c23a1ad153af7b00e641f5c2573f2c0 (patch) | |
tree | 5aff4d63a19c2299618eabed9fe5e063a7999c2b /gtk2_ardour/editor_summary.cc | |
parent | ba8b84eed159b5c6282b176ccd488134a9ea5b72 (diff) |
Modified version of Lincoln's patch to stop the summary causing very low track heights. Fixes #3527.
git-svn-id: svn://localhost/ardour2/branches/3.0@7994 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_summary.cc')
-rw-r--r-- | gtk2_ardour/editor_summary.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index b75f228c52..423b137cd8 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -26,6 +26,7 @@ #include "region_view.h" #include "rgb_macros.h" #include "keyboard.h" +#include "editor_routes.h" using namespace std; using namespace ARDOUR; @@ -666,12 +667,15 @@ EditorSummary::set_editor_y (pair<double, double> const & y) pair<double, double> yc = y; double total_height = 0; double scale_height = 0; + + _editor->_routes->suspend_redisplay (); + for (TrackViewList::const_iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) { if ((*i)->hidden()) { continue; } - + double const h = (*i)->effective_height (); if (yc.first >= 0 && yc.first < _track_height) { @@ -687,7 +691,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y) yc.first -= _track_height; yc.second -= _track_height; } - + /* hence required scale factor of the complete tracks to fit the required y range */ double const scale = ((_editor->canvas_height() - _editor->get_canvas_timebars_vsize()) - (total_height - scale_height)) / scale_height; @@ -702,13 +706,15 @@ EditorSummary::set_editor_y (pair<double, double> const & y) } if (yc.first < 0 && yc.second > _track_height) { - (*i)->set_height ((*i)->effective_height() * scale); + (*i)->set_height (max (TimeAxisView::preset_height (HeightSmall), (uint32_t) ((*i)->effective_height() * scale))); } yc.first -= _track_height; yc.second -= _track_height; } + _editor->_routes->resume_redisplay (); + set_editor_y (y.first); } |