From 3dc51ba506c2fcc0cdcde8101b722e31b5180ef7 Mon Sep 17 00:00:00 2001 From: Paul Giblock Date: Fri, 25 Apr 2008 05:25:20 +0000 Subject: [PATCH] Fixed drawing of piano roll background while scrolling git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@936 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 2 +- src/gui/piano_roll.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ebb9b85b..c949b0202 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,7 @@ - Allow volume bars to be modified by clicking one bar, then sweeping the mouse - shade volume bars according to volume - + - fixed drawing of background while scrolling 2008-04-20 Tobias Doerffel diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index 3069afbfe..eef9e00e7 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -1819,7 +1819,8 @@ void pianoRoll::paintEvent( QPaintEvent * _pe ) // draw vertical raster int tact_16th = m_currentPosition / ( DefaultTicksPerTact / 16 ); const int offset = ( m_currentPosition % (DefaultTicksPerTact/16) ) * - m_ppt / DEFAULT_STEPS_PER_TACT / 8; + m_ppt / DefaultTicksPerTact; + for( int x = WHITE_KEY_WIDTH - offset; x < width(); x += m_ppt / DEFAULT_STEPS_PER_TACT, ++tact_16th ) {