forked from qt-creator/qt-creator
Do update the bounging rect for a empty item list too
This commit is contained in:
@@ -123,19 +123,18 @@ void SelectionTool::mouseMoveEvent(const QList<QGraphicsItem*> &/*itemList*/,
|
|||||||
void SelectionTool::hoverMoveEvent(const QList<QGraphicsItem*> &itemList,
|
void SelectionTool::hoverMoveEvent(const QList<QGraphicsItem*> &itemList,
|
||||||
QGraphicsSceneMouseEvent * /*event*/)
|
QGraphicsSceneMouseEvent * /*event*/)
|
||||||
{
|
{
|
||||||
if (itemList.isEmpty())
|
if (!itemList.isEmpty()) {
|
||||||
return;
|
|
||||||
|
|
||||||
ResizeHandleItem* resizeHandle = ResizeHandleItem::fromGraphicsItem(itemList.first());
|
ResizeHandleItem* resizeHandle = ResizeHandleItem::fromGraphicsItem(itemList.first());
|
||||||
if (resizeHandle) {
|
if (resizeHandle) {
|
||||||
view()->changeToResizeTool();
|
view()->changeToResizeTool();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (topSelectedItemIsMovable(itemList))
|
||||||
|
view()->changeToMoveTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (topSelectedItemIsMovable(itemList))
|
|
||||||
view()->changeToMoveTool();
|
|
||||||
|
|
||||||
|
|
||||||
FormEditorItem *topSelectableItem = 0;
|
FormEditorItem *topSelectableItem = 0;
|
||||||
|
|
||||||
foreach(QGraphicsItem* item, itemList)
|
foreach(QGraphicsItem* item, itemList)
|
||||||
|
|||||||
Reference in New Issue
Block a user