Optimisation: Don't work out position based on visualParent if there isn't one

This commit is contained in:
David Edmundson 2014-01-29 16:54:56 +01:00
parent a805af6e7d
commit c9c79e7a42

View File

@ -378,12 +378,11 @@ void DialogProxy::syncToMainItemSize()
QSize(m_frameSvgItem->margins()->left() + m_frameSvgItem->margins()->right(), QSize(m_frameSvgItem->margins()->left() + m_frameSvgItem->margins()->right(),
m_frameSvgItem->margins()->top() + m_frameSvgItem->margins()->bottom()); m_frameSvgItem->margins()->top() + m_frameSvgItem->margins()->bottom());
if (visualParent()) {
const QRect geom(popupPosition(visualParent(), s, Qt::AlignCenter), s); const QRect geom(popupPosition(visualParent(), s, Qt::AlignCenter), s);
if (geom == geometry()) { if (geom == geometry()) {
return; return;
} }
if (visualParent()) {
adjustGeometry(geom); adjustGeometry(geom);
} else { } else {
resize(s); resize(s);