mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Only call update() in setGeometry() when it's a new rect.
This commit is contained in:
+7
-1
@@ -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
|
||||
|
||||
+1
@@ -72,6 +72,7 @@ private:
|
||||
int smartSpacing(QStyle::PixelMetric pm) const;
|
||||
|
||||
QList<QLayoutItem *> itemList;
|
||||
QRect m_prevRect;
|
||||
bool m_fixedGrid;
|
||||
int m_hSpace;
|
||||
int m_vSpace;
|
||||
|
||||
Reference in New Issue
Block a user