From 90222c3f45ef073df7072089adecef5ba502f31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Thu, 2 Apr 2020 16:07:54 +0200 Subject: [PATCH] [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 --- apps/calculation/selectable_table_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/calculation/selectable_table_view.cpp b/apps/calculation/selectable_table_view.cpp index e2d81e53c..12599842b 100644 --- a/apps/calculation/selectable_table_view.cpp +++ b/apps/calculation/selectable_table_view.cpp @@ -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();