[apps/calculation] HistoryController: reload the subview selection when

deleting row

This fixes the following bug: input 1, OK, 1.2 OK, delete the row whose
input is '1' with the selection on the output view. The output of 1.2
does not toggle and it should.
This commit is contained in:
Émilie Feral
2020-07-15 13:11:27 +02:00
committed by LeaNumworks
parent 43744bcae9
commit c92b3d49e9

View File

@@ -129,7 +129,9 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
return true;
}
m_selectableTableView.selectCellAtLocation(0, focusRow > 0 ? focusRow - 1 : 0);
setSelectedSubviewType(subviewType, true, 0, selectedRow());
/* The parameters 'sameCell' and 'previousSelectedY' are chosen to enforce
* toggling of the output when necessary. */
setSelectedSubviewType(subviewType, false, 0, (subviewType == SubviewType::Input) ? selectedRow() : -1);
return true;
}
if (event == Ion::Events::Clear) {