Commit 23d654cf authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Use qRound instead of qCeil to fix an off-by-one error.

CCBUG: 199259
parent 1360bc76
......@@ -146,7 +146,7 @@ void TileScalingTextureMapper::mapTexture( GeoPainter *geoPainter, ViewParams *v
StackedTile *const tile = m_tileLoader->loadTile( stackedId );
tile->setUsed( true );
const QSize size = QSize( qCeil( rect.right() - rect.left() ), qCeil( rect.bottom() - rect.top() ) );
const QSize size = QSize( qRound( rect.right() - rect.left() ), qRound( rect.bottom() - rect.top() ) );
const int cacheHash = 2 * ( size.width() % 2 ) + ( size.height() % 2 );
const TileId cacheId = TileId( cacheHash, stackedId.zoomLevel(), stackedId.x(), stackedId.y() );
QPixmap *im = (*m_cache)[cacheId];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment