From 736566b12ccaf747935fee9311b2d93a7fca737c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 11 Nov 2016 18:35:22 +0100 Subject: [PATCH] Fixed path view clipping --- src/pathview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pathview.cpp b/src/pathview.cpp index 661c115f..29fab2ca 100644 --- a/src/pathview.cpp +++ b/src/pathview.cpp @@ -217,8 +217,8 @@ QList PathView::loadData(const Data &data) qreal scale = mapScale(_zoom); QRectF br = scaled(_tr | _rr | _wr, 1.0/scale); - QRectF ba = br.adjusted(-Tile::size() * scale, -Tile::size() * scale, - Tile::size() * scale, Tile::size() * scale); + QRectF ba = br.adjusted(-Tile::size(), -Tile::size(), Tile::size(), + Tile::size()); _scene->setSceneRect(ba); centerOn(ba.center()); @@ -397,8 +397,8 @@ void PathView::zoom(int z, const QPoint &pos) rescale(_zoom); qreal scale = mapScale(_zoom); QRectF br = scaled(_tr | _rr | _wr, 1.0/scale); - QRectF ba = br.adjusted(-Tile::size() * scale, -Tile::size() * scale, - Tile::size() * scale, Tile::size() * scale); + QRectF ba = br.adjusted(-Tile::size(), -Tile::size(), Tile::size(), + Tile::size()); _scene->setSceneRect(ba); if (br.width() < viewport()->size().width() @@ -612,8 +612,8 @@ void PathView::resizeEvent(QResizeEvent *event) qreal scale = mapScale(_zoom); QRectF br = scaled(_tr | _rr | _wr, 1.0/scale); - QRectF ba = br.adjusted(-Tile::size() * scale, -Tile::size() * scale, - Tile::size() * scale, Tile::size() * scale); + QRectF ba = br.adjusted(-Tile::size(), -Tile::size(), Tile::size(), + Tile::size()); if (ba.width() < event->size().width()) { qreal diff = event->size().width() - ba.width();