if (cached_pos != lines.end()) {
if (coord < cached_pos->coord) {
/* backward search */
- while(--cached_pos != lines.end()) {
+ while (--cached_pos != lines.end()) {
if (cached_pos->coord <= coord) {
if (cached_pos->coord + cached_pos->width < coord) {
/* coord is between two lines */
}
} else {
/* forward search */
- while(cached_pos != lines.end()) {
+ while (cached_pos != lines.end()) {
if (cached_pos->coord > coord) {
/* we searched past the line that we want, so now see
if the previous line includes the coordinate */
using namespace std;
-#define MAX_CACHED_LINES 512
+#define MAX_CACHED_LINES 128
TempoLines::TempoLines(ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group)
: _canvas(canvas)
_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;
if (beat_density > 4.0f) {
/* if the lines are too close together, they become useless */
+ tempo_map_changed();
return;
}