reset fixed
This commit is contained in:
parent
9593226e0c
commit
247d7cb7a9
@ -30,6 +30,7 @@ void QskLayoutChain::reset( int count, qreal constraint )
|
|||||||
{
|
{
|
||||||
m_cells.assign( count, Cell() );
|
m_cells.assign( count, Cell() );
|
||||||
m_constraint = constraint;
|
m_constraint = constraint;
|
||||||
|
m_sumStretches = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskLayoutChain::addCell( int index, const Cell& cell )
|
void QskLayoutChain::addCell( int index, const Cell& cell )
|
||||||
@ -196,7 +197,6 @@ QVector< QskLayoutChain::Range > QskLayoutChain::minimumExpanded( qreal size ) c
|
|||||||
sumFactors += factors[i];
|
sumFactors += factors[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for ( uint i = 0; i < m_cells.size(); i++ )
|
for ( uint i = 0; i < m_cells.size(); i++ )
|
||||||
{
|
{
|
||||||
const auto& hint = m_cells[i].hint;
|
const auto& hint = m_cells[i].hint;
|
||||||
|
@ -37,6 +37,7 @@ class QskLayoutChain
|
|||||||
|
|
||||||
void reset( int count, qreal constraint );
|
void reset( int count, qreal constraint );
|
||||||
void addCell( int index, const Cell& );
|
void addCell( int index, const Cell& );
|
||||||
|
Cell cell( int index ) const { return m_cells[ index ]; }
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
bool setSpacing( qreal spacing );
|
bool setSpacing( qreal spacing );
|
||||||
@ -58,7 +59,7 @@ class QskLayoutChain
|
|||||||
QVector< Range > preferredStretched( qreal size ) const;
|
QVector< Range > preferredStretched( qreal size ) const;
|
||||||
|
|
||||||
QskLayoutHint m_boundingHint;
|
QskLayoutHint m_boundingHint;
|
||||||
qreal m_constraint = -2;
|
qreal m_constraint = -2.0;
|
||||||
|
|
||||||
qreal m_spacing = 0;
|
qreal m_spacing = 0;
|
||||||
Qt::Edges m_extraSpacingAt;
|
Qt::Edges m_extraSpacingAt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user