diff --git a/src/plugins/qmldesigner/components/formeditor/selectionrectangle.cpp b/src/plugins/qmldesigner/components/formeditor/selectionrectangle.cpp index bb2e3b3ff74..86dbcdb67f7 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectionrectangle.cpp +++ b/src/plugins/qmldesigner/components/formeditor/selectionrectangle.cpp @@ -59,11 +59,13 @@ void SelectionRectangle::clear() } void SelectionRectangle::show() { + m_controlShape->setParentItem(m_layerItem.data()); m_controlShape->show(); } void SelectionRectangle::hide() { + m_controlShape->setParentItem(0); m_controlShape->hide(); }