diff --git a/qrenderdoc/3rdparty/flowlayout/FlowLayout.cpp b/qrenderdoc/3rdparty/flowlayout/FlowLayout.cpp index 89a22b154..938585334 100644 --- a/qrenderdoc/3rdparty/flowlayout/FlowLayout.cpp +++ b/qrenderdoc/3rdparty/flowlayout/FlowLayout.cpp @@ -130,9 +130,15 @@ int FlowLayout::heightForWidth(int width) const void FlowLayout::setGeometry(const QRect &rect) { + bool needUpdate = (rect != m_prevRect); + QLayout::setGeometry(rect); doLayout(rect, false); - update(); + + if(needUpdate) + update(); + + m_prevRect = rect; } QSize FlowLayout::sizeHint() const diff --git a/qrenderdoc/3rdparty/flowlayout/FlowLayout.h b/qrenderdoc/3rdparty/flowlayout/FlowLayout.h index 5d2512b52..3e822b35f 100644 --- a/qrenderdoc/3rdparty/flowlayout/FlowLayout.h +++ b/qrenderdoc/3rdparty/flowlayout/FlowLayout.h @@ -72,6 +72,7 @@ private: int smartSpacing(QStyle::PixelMetric pm) const; QList itemList; + QRect m_prevRect; bool m_fixedGrid; int m_hSpace; int m_vSpace;