[apps/calculation] SelectableTableView: scrollToCell once the margin

have been updated

This fixes the following bug: input the vertical matrix [1,2,3], the
scroll failed
This commit is contained in:
Émilie Feral
2020-04-02 16:07:54 +02:00
committed by LeaNumworks
parent e6516ae0e7
commit 90222c3f45

View File

@@ -12,12 +12,12 @@ CalculationSelectableTableView::CalculationSelectableTableView(Responder * paren
}
void CalculationSelectableTableView::scrollToCell(int i, int j) {
::SelectableTableView::scrollToCell(i, j);
if (m_contentView.bounds().height() < bounds().height()) {
setTopMargin(bounds().height() - m_contentView.bounds().height());
} else {
setTopMargin(0);
}
::SelectableTableView::scrollToCell(i, j);
ScrollView::layoutSubviews();
if (m_contentView.bounds().height() - contentOffset().y() < bounds().height()) {
KDCoordinate contentOffsetX = contentOffset().x();