From ab37a15b3bb46f49fa938c5000e26ca2efffdeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 12 Oct 2016 15:36:30 +0200 Subject: [PATCH] [escher] Correct bug: update the subview layout when resizing the content view Change-Id: I5941ca52d2b53332ab6d4cd03312862e9f48c71c --- escher/src/scroll_view.cpp | 6 ++++-- escher/src/table_view.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/escher/src/scroll_view.cpp b/escher/src/scroll_view.cpp index e2c3ad93d..d8118f606 100644 --- a/escher/src/scroll_view.cpp +++ b/escher/src/scroll_view.cpp @@ -112,8 +112,10 @@ void ScrollView::updateScrollIndicator() { } void ScrollView::setContentOffset(KDPoint offset) { - m_offset = offset; - layoutSubviews(); + if (offset != m_offset) { + m_offset = offset; + layoutSubviews(); + } } KDPoint ScrollView::contentOffset() { diff --git a/escher/src/table_view.cpp b/escher/src/table_view.cpp index 91b7f22a0..4e155fa84 100644 --- a/escher/src/table_view.cpp +++ b/escher/src/table_view.cpp @@ -56,6 +56,7 @@ KDCoordinate TableView::ContentView::columnWidth(int i) const { void TableView::ContentView::resizeToFitContent() { setSize(KDSize(width(), height())); + layoutSubviews(); } KDCoordinate TableView::ContentView::height() const {