workaround for a QGridLayoutEngine bug added
This commit is contained in:
parent
36e4fe2d5f
commit
7f4102ff7d
@ -107,6 +107,24 @@ void QskStackBox::layoutItemRemoved( QskLayoutItem*, int index )
|
|||||||
m_data->currentIndex--;
|
m_data->currentIndex--;
|
||||||
// currentIndexChanged ???
|
// currentIndexChanged ???
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto& engine = this->engine();
|
||||||
|
if ( engine.itemCount() > 0 && engine.itemAt( 0, 0 ) == nullptr )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Using QGridLayoutEngine for a stack layout is actually
|
||||||
|
not a good ideas. Until we have a new implementation,
|
||||||
|
we need to work around situations, where the layout does
|
||||||
|
not work properly with having several items in the
|
||||||
|
same cell.
|
||||||
|
In this particular situation we need to fix, that we lost
|
||||||
|
the item from engine.q_grid[0].
|
||||||
|
Calling transpose has this side effect.
|
||||||
|
|
||||||
|
*/
|
||||||
|
engine.transpose();
|
||||||
|
engine.transpose(); // reverting the call before
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskStackBox::setCurrentIndex( int index )
|
void QskStackBox::setCurrentIndex( int index )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user