From eb614860ebf60ea99770fccc298371e8a1bd2043 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Wed, 31 Jul 2019 15:52:08 +0200 Subject: [PATCH] [apps/shared/store_controller] Remove cellShouldBeTransparent --- apps/shared/store_controller.cpp | 10 +++------- apps/shared/store_controller.h | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/shared/store_controller.cpp b/apps/shared/store_controller.cpp index 96f71f977..8ffc2c424 100644 --- a/apps/shared/store_controller.cpp +++ b/apps/shared/store_controller.cpp @@ -159,10 +159,11 @@ void StoreController::willDisplayCellAtLocation(HighlightCell * cell, int i, int static_cast(cell)->setSeparatorLeft(shouldHaveLeftSeparator); } // Handle empty cells - if (j > 0 && j > m_store->numberOfPairsOfSeries(seriesAtColumn(i)) && j < numberOfRows()) { + const int numberOfElementsInCol = m_store->numberOfPairsOfSeries(seriesAtColumn(i)); + if (j > numberOfElementsInCol) { StoreCell * myCell = static_cast(cell); myCell->editableTextCell()->textField()->setText(""); - if (cellShouldBeTransparent(i,j)) { + if (numberOfElementsInCol + 1 < j) { myCell->setHide(true); } else { myCell->setEven(j%2 == 0); @@ -303,9 +304,4 @@ bool StoreController::privateFillColumnWithFormula(Expression formula, Expressio return true; } -bool StoreController::cellShouldBeTransparent(int i, int j) { - int seriesIndex = i/DoublePairStore::k_numberOfColumnsPerSeries; - return j > 1 + m_store->numberOfPairsOfSeries(seriesIndex); -} - } diff --git a/apps/shared/store_controller.h b/apps/shared/store_controller.h index b98f5ef59..05262ab88 100644 --- a/apps/shared/store_controller.h +++ b/apps/shared/store_controller.h @@ -88,7 +88,6 @@ protected: StoreCell m_editableCells[k_maxNumberOfEditableCells]; DoublePairStore * m_store; private: - bool cellShouldBeTransparent(int i, int j); ContentView m_contentView; };