Merge pull request #1506 from curlymorphic/i1255
Proposed fix for 1255 Segment/clip not showing whole last note in Song E...
This commit is contained in:
@@ -943,7 +943,9 @@ void PatternView::paintEvent( QPaintEvent * )
|
||||
const float ppt = fixedTCOs() ?
|
||||
( parentWidget()->width() - 2 * TCO_BORDER_WIDTH )
|
||||
/ (float) m_pat->length().getTact() :
|
||||
pixelsPerTact();
|
||||
( width() - 2 * TCO_BORDER_WIDTH )
|
||||
/ (float) m_pat->length().getTact();
|
||||
|
||||
|
||||
const int x_base = TCO_BORDER_WIDTH;
|
||||
p.setPen( c.darker( 300 ) );
|
||||
@@ -996,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;
|
||||
@@ -1021,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<int>( TCO_BORDER_WIDTH + y_key * ht );
|
||||
const int y_pos = static_cast<int>( 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 );
|
||||
|
||||
Reference in New Issue
Block a user