mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-16 10:17:04 +00:00
Fix tiles issue when zooming out a rotated document
The issue can be reproduced by zooming a rotated document to 1600% then back to 800% REVIEW: 110905
This commit is contained in:
parent
449861c118
commit
7a41ee5d50
|
@ -313,7 +313,8 @@ void TilesManager::Private::setPixmap( const QPixmap *pixmap, const NormalizedRe
|
|||
totalPixels -= tile.pixmap->width()*tile.pixmap->height();
|
||||
delete tile.pixmap;
|
||||
}
|
||||
tile.pixmap = new QPixmap( pixmap->copy( tile.rect.geometry( width, height ).translated( -pixmapRect.topLeft() ) ) );
|
||||
NormalizedRect rotatedRect = TilesManager::toRotatedRect( tile.rect, rotation );
|
||||
tile.pixmap = new QPixmap( pixmap->copy( rotatedRect.geometry( width, height ).translated( -pixmapRect.topLeft() ) ) );
|
||||
tile.rotation = rotation;
|
||||
totalPixels += tile.pixmap->width()*tile.pixmap->height();
|
||||
tile.dirty = false;
|
||||
|
|
Loading…
Reference in a new issue