comparison layer/WaveformLayer.cpp @ 1341:ab2cafd3a7cb zoom

Fixes for TimeRuler spacing and for the boundaries of the WaveformLayer paint area
author Chris Cannam
date Thu, 27 Sep 2018 15:20:25 +0100
parents fc3c9971a43a
children 5f3e374746b6
comparison
equal deleted inserted replaced
1340:fc3c9971a43a 1341:ab2cafd3a7cb
425 425
426 f0 = viewFrame; 426 f0 = viewFrame;
427 f0 = f0 / modelZoomLevel; 427 f0 = f0 / modelZoomLevel;
428 f0 = f0 * modelZoomLevel; 428 f0 = f0 * modelZoomLevel;
429 429
430 viewFrame = v->getFrameForX(x + 1); 430 if (v->getZoomLevel().zone == ZoomLevel::PixelsPerFrame) {
431 431 f1 = f0 + 1;
432 f1 = viewFrame; 432 } else {
433 f1 = f1 / modelZoomLevel; 433 viewFrame = v->getFrameForX(x + 1);
434 f1 = f1 * modelZoomLevel; 434 f1 = viewFrame;
435 f1 = f1 / modelZoomLevel;
436 f1 = f1 * modelZoomLevel;
437 }
435 438
436 return (f0 < m_model->getEndFrame()); 439 return (f0 < m_model->getEndFrame());
437 } 440 }
438 441
439 float 442 float