diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index 5b73614b9..01640a194 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -378,12 +378,11 @@ void DialogProxy::syncToMainItemSize() QSize(m_frameSvgItem->margins()->left() + m_frameSvgItem->margins()->right(), m_frameSvgItem->margins()->top() + m_frameSvgItem->margins()->bottom()); - const QRect geom(popupPosition(visualParent(), s, Qt::AlignCenter), s); - if (geom == geometry()) { - return; - } - if (visualParent()) { + const QRect geom(popupPosition(visualParent(), s, Qt::AlignCenter), s); + if (geom == geometry()) { + return; + } adjustGeometry(geom); } else { resize(s);