Skip to content

Commit

Permalink
Fixed map object artifacts when dragging and zoomed in
Browse files Browse the repository at this point in the history
The line width is 3 but the shadow is shifted by one, so the additional
width for the bounding box should be 4.
  • Loading branch information
bjorn committed Nov 13, 2009
1 parent 4bffdcc commit 8851f3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mapobjectitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ void MapObjectItem::setEditable(bool editable)

QRectF MapObjectItem::boundingRect() const
{
// The -1 and +3 are to account for the pen width and shadow
// The -1 and +4 are to account for the pen width and shadow
if (mSize.isNull()) {
return QRectF(-15 - 1, -25 - 1, 25 + 3, 35 + 3);
return QRectF(-15 - 1, -25 - 1, 25 + 4, 35 + 4);
} else {
return QRectF(-1, -15 - 1,
mSize.width() + 3,
mSize.height() + 3 + 15);
mSize.width() + 4,
mSize.height() + 4 + 15);
}
}

Expand Down

0 comments on commit 8851f3b

Please sign in to comment.