QmlDesigner: Fix rubberband

It should reparented because at a model detach it will be removed from the
scene and deleted.

Task-number: QTCREATORBUG-12504
Change-Id: Id48c8d8f8a29b7aab60dca708bbefdac8c1f6024
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
Marco Bubke
2014-07-01 11:08:46 +02:00
parent 4dc438db5e
commit 139449239c

View File

@@ -59,11 +59,13 @@ void SelectionRectangle::clear()
} }
void SelectionRectangle::show() void SelectionRectangle::show()
{ {
m_controlShape->setParentItem(m_layerItem.data());
m_controlShape->show(); m_controlShape->show();
} }
void SelectionRectangle::hide() void SelectionRectangle::hide()
{ {
m_controlShape->setParentItem(0);
m_controlShape->hide(); m_controlShape->hide();
} }