Optimisation: Don't work out position based on visualParent if there isn't one
This commit is contained in:
parent
a805af6e7d
commit
c9c79e7a42
@ -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());
|
||||||
|
|
||||||
const QRect geom(popupPosition(visualParent(), s, Qt::AlignCenter), s);
|
|
||||||
if (geom == geometry()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (visualParent()) {
|
if (visualParent()) {
|
||||||
|
const QRect geom(popupPosition(visualParent(), s, Qt::AlignCenter), s);
|
||||||
|
if (geom == geometry()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
adjustGeometry(geom);
|
adjustGeometry(geom);
|
||||||
} else {
|
} else {
|
||||||
resize(s);
|
resize(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user