From fa385f66278e2406b91f6e56bcad42fd65f3768c Mon Sep 17 00:00:00 2001 From: Paul Giblock Date: Sun, 18 May 2008 17:24:43 +0000 Subject: [PATCH] Remove casting warning git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@989 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/track.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/track.cpp b/src/core/track.cpp index 56655919f..61c42963d 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -863,7 +863,9 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) QPainter p( this ); const int tactsPerBar = 4; const trackContainerView * tcv = m_trackView->getTrackContainerView(); - int ppt = tcv->pixelsPerTact(); + + // Assume even-pixels-per-tact. Makes sense, should be like this anyways + int ppt = static_cast( tcv->pixelsPerTact() ); // Update background if needed if( ppt != last_ppt ) @@ -897,8 +899,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) p.drawTiledPixmap( rect(), backgrnd, QPoint( - tcv->currentPosition().getTact() - * tcv->pixelsPerTact(), 0 ) ); + tcv->currentPosition().getTact() * ppt, 0 ) ); /* if( !tcv->fixedTCOs() )