summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-23 00:52:21 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-23 00:52:21 -0400
commit2a52786e04fac57aba89846694135da330b8e9b3 (patch)
tree064061175840a0e3bc7c67b3dccd1d920966be66
parent9a976e80bda39289d2e1f9b7f7d7740a9f03b358 (diff)
downloadsigen-2a52786e04fac57aba89846694135da330b8e9b3.tar.gz
sigen-2a52786e04fac57aba89846694135da330b8e9b3.tar.xz
sigen-2a52786e04fac57aba89846694135da330b8e9b3.zip
Better detection of collision
-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 ef1f6e1b..6dceaed3 100644
--- a/sigmodr/widgets/mapeditor/WorldMapItem.cpp
+++ b/sigmodr/widgets/mapeditor/WorldMapItem.cpp
@@ -95,7 +95,7 @@ bool WorldMapItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectio
return false;
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);
+ return !rect.intersected(otherRect).isNull();
}
int WorldMapItem::type() const