[apps/calculation] SelectableView: force relayouting subviews in

scrollToCell
This commit is contained in:
Émilie Feral
2019-10-15 17:20:28 +02:00
committed by Léa Saviot
parent efe66a1218
commit b566846c49

View File

@@ -18,7 +18,8 @@ void CalculationSelectableTableView::scrollToCell(int i, int j) {
} else {
setTopMargin(0);
}
ScrollView::layoutSubviews();
// Force to relayout
ScrollView::layoutSubviews(true);
if (m_contentView.bounds().height() - contentOffset().y() < bounds().height()) {
KDCoordinate contentOffsetX = contentOffset().x();
KDCoordinate contentOffsetY = dataSource()->cumulatedHeightFromIndex(dataSource()->numberOfRows()) - maxContentHeightDisplayableWithoutScrolling();