[apps/shared/store_controller] Remove cellShouldBeTransparent

This commit is contained in:
Ruben Dashyan
2019-07-31 15:52:08 +02:00
parent 4ec7b801fd
commit eb614860eb
2 changed files with 3 additions and 8 deletions

View File

@@ -159,10 +159,11 @@ void StoreController::willDisplayCellAtLocation(HighlightCell * cell, int i, int
static_cast<StoreCell *>(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<StoreCell *>(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);
}
}

View File

@@ -88,7 +88,6 @@ protected:
StoreCell m_editableCells[k_maxNumberOfEditableCells];
DoublePairStore * m_store;
private:
bool cellShouldBeTransparent(int i, int j);
ContentView m_contentView;
};