don't try to set the main widget multiple times

This commit is contained in:
Marco Martin 2011-12-01 19:54:32 +01:00
parent 9726906ed0
commit 7988a4a7e4

View File

@ -135,6 +135,11 @@ void DialogProxy::syncMainItem()
return;
}
if (static_cast<QGraphicsObject *>(m_dialog->graphicsWidget()) == m_mainItem.data() ||
(m_declarativeItemContainer && m_declarativeItemContainer->declarativeItem() == m_mainItem.data())) {
return;
}
//not have a scene? go up in the hyerarchy until we find something with a scene
QGraphicsScene *scene = m_mainItem.data()->scene();
if (!scene) {