diff options
author | David Robillard <d@drobilla.net> | 2008-09-28 15:22:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-28 15:22:07 +0000 |
commit | 3b424fd8b55ee68f229463ccf3408de81a5c56d9 (patch) | |
tree | 3772dacecd58310d8a6f4f9a491ddb1321497fb1 /gtk2_ardour/tempo_lines.cc | |
parent | 6b50ba341da426805ce3c92609c0fa12c52b67ac (diff) |
Invalidate line cache when zoomed out to invisible line levels.
Reduce line cache size to 128.
git-svn-id: svn://localhost/ardour2/branches/3.0@3819 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/tempo_lines.cc')
-rw-r--r-- | gtk2_ardour/tempo_lines.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index 5b73c877ac..3d2f54a2ff 100644 --- a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ -24,7 +24,7 @@ using namespace std; -#define MAX_CACHED_LINES 512 +#define MAX_CACHED_LINES 128 TempoLines::TempoLines(ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group) : _canvas(canvas) @@ -40,7 +40,7 @@ TempoLines::tempo_map_changed() _clean_left = DBL_MAX; _clean_right = 0.0; - size_t d = 0; + size_t d = 1; // TODO: Dirty/slow, but 'needed' for zoom :( for (Lines::iterator i = _lines.begin(); i != _lines.end(); ++d) { Lines::iterator next = i; @@ -98,6 +98,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit if (beat_density > 4.0f) { /* if the lines are too close together, they become useless */ + tempo_map_changed(); return; } |