summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-23 00:51:48 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-23 00:51:48 -0400
commit9a976e80bda39289d2e1f9b7f7d7740a9f03b358 (patch)
tree18f3196cd4295b701901b6de0f489b439fd3f205
parent341ee331747ee30cb3ef95ad025ef7e6ac6f0853 (diff)
Shrink the rectangle so that edges can be shared
-rw-r--r--sigmodr/widgets/mapeditor/WorldMapItem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sigmodr/widgets/mapeditor/WorldMapItem.cpp b/sigmodr/widgets/mapeditor/WorldMapItem.cpp
index 3eec27b7..ef1f6e1b 100644
--- a/sigmodr/widgets/mapeditor/WorldMapItem.cpp
+++ b/sigmodr/widgets/mapeditor/WorldMapItem.cpp
@@ -93,7 +93,7 @@ bool WorldMapItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectio
const WorldMapItem* item = qgraphicsitem_cast<const WorldMapItem*>(other);
if (!item)
return false;
- const QRectF rect(scenePos(), QPointF(m_map->width(), m_map->height()));
+ const QRectF rect = QRectF(scenePos(), QPointF(m_map->width(), m_map->height())).adjusted(1, 1, -1, -1);
const QRectF otherRect(item->scenePos(), QPointF(item->m_map->width(), item->m_map->height()));
return rect.intersects(otherRect);
}