Fix crash adding lift_gamma_gain with narrow effect stack

parent a853d846
Pipeline #14258 canceled with stage
......@@ -149,10 +149,10 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
if (m_itemList.isEmpty() || effectiveRect.width() <= 0 || effectiveRect.height() <= 0) {
return 0;
}
QWidget *wid = m_itemList.at(0)->widget();
QSize min = wid->minimumSize();
int columns = qMin(qFloor((double)rect.width() / min.width()), m_itemList.size());
columns = qMax(1, columns);
int realWidth = rect.width() / columns - horizontalSpacing();
int totalHeight = y - rect.y() + bottom + qCeil((double)m_itemList.size() / columns) * (realWidth + verticalSpacing());
m_minimumSize = QSize(rect.width(), totalHeight);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment