reset fixed

This commit is contained in:
Uwe Rathmann 2019-07-01 16:48:57 +02:00
parent 9593226e0c
commit 247d7cb7a9
2 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,7 @@ void QskLayoutChain::reset( int count, qreal constraint )
{
m_cells.assign( count, Cell() );
m_constraint = constraint;
m_sumStretches = 0;
}
void QskLayoutChain::addCell( int index, const Cell& cell )
@ -196,7 +197,6 @@ QVector< QskLayoutChain::Range > QskLayoutChain::minimumExpanded( qreal size ) c
sumFactors += factors[i];
}
for ( uint i = 0; i < m_cells.size(); i++ )
{
const auto& hint = m_cells[i].hint;

View File

@ -37,6 +37,7 @@ class QskLayoutChain
void reset( int count, qreal constraint );
void addCell( int index, const Cell& );
Cell cell( int index ) const { return m_cells[ index ]; }
void finish();
bool setSpacing( qreal spacing );
@ -58,7 +59,7 @@ class QskLayoutChain
QVector< Range > preferredStretched( qreal size ) const;
QskLayoutHint m_boundingHint;
qreal m_constraint = -2;
qreal m_constraint = -2.0;
qreal m_spacing = 0;
Qt::Edges m_extraSpacingAt;