From 0c44deb35fb4f42e88c8011757b1c7c317c2e5b1 Mon Sep 17 00:00:00 2001 From: Gabriel Ozouf Date: Fri, 13 Nov 2020 17:12:24 +0100 Subject: [PATCH] [poincare/matrix_layout] Change comparison order Change-Id: Iaa048d82005a7dfa380357e80bbac447c0976e55 --- poincare/src/matrix_layout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poincare/src/matrix_layout.cpp b/poincare/src/matrix_layout.cpp index c57af6126..26c90d690 100644 --- a/poincare/src/matrix_layout.cpp +++ b/poincare/src/matrix_layout.cpp @@ -102,13 +102,13 @@ void MatrixLayoutNode::deleteBeforeCursor(LayoutCursor * cursor) { int rowIndex = rowAtChildIndex(indexOfPointedLayout); bool deleted = false; if (columnIndex == 0) { - if (rowIndex < m_numberOfRows - 1 && isRowEmpty(rowIndex) && m_numberOfRows > 2) { + if (m_numberOfRows > 2 && rowIndex < m_numberOfRows - 1 && isRowEmpty(rowIndex)) { deleteRowAtIndex(rowIndex); deleted = true; } } if (rowIndex == 0) { - if (columnIndex < m_numberOfColumns - 1 && isColumnEmpty(columnIndex) && m_numberOfColumns > 2) { + if (m_numberOfColumns > 2 && columnIndex < m_numberOfColumns - 1 && isColumnEmpty(columnIndex)) { deleteColumnAtIndex(columnIndex); deleted = true; }