diff --git a/escher/src/scrollable_expression_view_with_cursor.cpp b/escher/src/scrollable_expression_view_with_cursor.cpp index c80e887a8..3860ea167 100644 --- a/escher/src/scrollable_expression_view_with_cursor.cpp +++ b/escher/src/scrollable_expression_view_with_cursor.cpp @@ -40,21 +40,18 @@ Toolbox * ScrollableExpressionViewWithCursor::toolbox() { bool ScrollableExpressionViewWithCursor::handleEvent(Ion::Events::Event event) { KDSize previousSize = minimalSizeForOptimalDisplay(); bool shouldRecomputeLayout = false; + bool didHandleEvent = false; if (privateHandleMoveEvent(event, &shouldRecomputeLayout)) { if (!shouldRecomputeLayout) { m_expressionViewWithCursor.cursorPositionChanged(); scrollToCursor(); return true; } - reload(); - KDSize newSize = minimalSizeForOptimalDisplay(); - if (m_delegate && previousSize.height() != newSize.height()) { - m_delegate->scrollableExpressionViewWithCursorDidChangeSize(this); - reload(); - } - return true; + didHandleEvent = true; + } else if (privateHandleEvent(event)) { + didHandleEvent = true; } - if (privateHandleEvent(event)) { + if (didHandleEvent) { reload(); KDSize newSize = minimalSizeForOptimalDisplay(); if (m_delegate && previousSize.height() != newSize.height()) {