Do update the bounging rect for a empty item list too

This commit is contained in:
Marco Bubke
2010-01-19 18:44:07 +01:00
parent eebc56e915
commit 81859e2b29

View File

@@ -123,19 +123,18 @@ void SelectionTool::mouseMoveEvent(const QList<QGraphicsItem*> &/*itemList*/,
void SelectionTool::hoverMoveEvent(const QList<QGraphicsItem*> &itemList,
QGraphicsSceneMouseEvent * /*event*/)
{
if (itemList.isEmpty())
return;
if (!itemList.isEmpty()) {
ResizeHandleItem* resizeHandle = ResizeHandleItem::fromGraphicsItem(itemList.first());
if (resizeHandle) {
view()->changeToResizeTool();
return;
ResizeHandleItem* resizeHandle = ResizeHandleItem::fromGraphicsItem(itemList.first());
if (resizeHandle) {
view()->changeToResizeTool();
return;
}
if (topSelectedItemIsMovable(itemList))
view()->changeToMoveTool();
}
if (topSelectedItemIsMovable(itemList))
view()->changeToMoveTool();
FormEditorItem *topSelectableItem = 0;
foreach(QGraphicsItem* item, itemList)