From c9c79e7a426a918de0a1b73dcd8ab56dea84e0eb Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 29 Jan 2014 16:54:56 +0100 Subject: [PATCH] Optimisation: Don't work out position based on visualParent if there isn't one --- src/declarativeimports/core/dialog.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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);