From a42d8a04eacc2628950b9f70b67a172dc705f293 Mon Sep 17 00:00:00 2001 From: Dave French Date: Fri, 26 Dec 2014 17:57:05 +0000 Subject: [PATCH] fix for 1255 added 1 pixel margin between border and top note --- src/tracks/Pattern.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 15d826f39..727fbd948 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -998,7 +998,7 @@ void PatternView::paintEvent( QPaintEvent * ) // qDebug( "keyrange: %d", keyrange ); // determine height of the pattern view, sans borders - const int ht = height() - 1 - TCO_BORDER_WIDTH * 2; + const int ht = (height() - 1 - TCO_BORDER_WIDTH * 2) -1; // determine maximum height value for drawing bounds checking const int max_ht = height() - 1 - TCO_BORDER_WIDTH; @@ -1023,7 +1023,7 @@ void PatternView::paintEvent( QPaintEvent * ) const float y_key = ( float( central_key - ( *it )->key() ) / keyrange + 1.0f ) / 2; // multiply that by pattern height - const int y_pos = static_cast( TCO_BORDER_WIDTH + y_key * ht ); + const int y_pos = static_cast( TCO_BORDER_WIDTH + y_key * ht ) + 1; // debug code // if( ( *it )->length() > 0 ) qDebug( "key %d, central_key %d, y_key %f, y_pos %d", ( *it )->key(), central_key, y_key, y_pos );