diff --git a/src/layouts/QskLayoutChain.cpp b/src/layouts/QskLayoutChain.cpp index c51cef64..27c5f620 100644 --- a/src/layouts/QskLayoutChain.cpp +++ b/src/layouts/QskLayoutChain.cpp @@ -34,13 +34,13 @@ void QskLayoutChain::reset( int count, qreal constraint ) m_sumStretches = 0; } -void QskLayoutChain::addCell( int index, const Cell& cell ) +void QskLayoutChain::expandTo( int index, const Cell& newCell ) { - auto& combinedCell = m_cells[ index ]; + auto& cell = m_cells[ index ]; - combinedCell.canGrow |= cell.canGrow; - combinedCell.stretch = qMax( combinedCell.stretch, cell.stretch ); - combinedCell.hint.intersect( cell.hint ); + cell.canGrow |= newCell.canGrow; + cell.stretch = qMax( cell.stretch, newCell.stretch ); + cell.hint.intersect( newCell.hint ); } void QskLayoutChain::finish() diff --git a/src/layouts/QskLayoutChain.h b/src/layouts/QskLayoutChain.h index 07d85d88..aa63bf42 100644 --- a/src/layouts/QskLayoutChain.h +++ b/src/layouts/QskLayoutChain.h @@ -52,7 +52,7 @@ class QskLayoutChain void invalidate(); void reset( int count, qreal constraint ); - void addCell( int index, const Cell& ); + void expandTo( int index, const Cell& ); void finish(); const Cell& cell( int index ) const { return m_cells[ index ]; } diff --git a/src/layouts/QskLinearLayoutEngine.cpp b/src/layouts/QskLinearLayoutEngine.cpp index 33833cc7..12e22eea 100644 --- a/src/layouts/QskLinearLayoutEngine.cpp +++ b/src/layouts/QskLinearLayoutEngine.cpp @@ -616,7 +616,7 @@ void EntryTable::resetChain( Qt::Orientation orientation, constraints.isEmpty() ? -1.0 : constraints[index1].length; const auto cell = this->cell( entry, orientation, cellConstraint ); - chain.addCell( index2, cell ); + chain.expandTo( index2, cell ); if ( m_orientation != orientation ) {