mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] SelectableTableView: when reloading data, we temporary deselect
the table. We warn the SelectableTableViewDelegate that the selection change is 'within a temporary selection change' when notifying it of the change.
This commit is contained in:
@@ -214,11 +214,11 @@ void FunctionListController::willExitResponderChain(Responder * nextFirstRespond
|
||||
|
||||
/* SelectableTableViewDelegate */
|
||||
|
||||
void FunctionListController::tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) {
|
||||
void FunctionListController::tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY, bool withinTemporarySelection) {
|
||||
// Update memoization of cell heights
|
||||
ExpressionModelListController::tableViewDidChangeSelection(t, previousSelectedCellX, previousSelectedCellY);
|
||||
ExpressionModelListController::tableViewDidChangeSelection(t, previousSelectedCellX, previousSelectedCellY, withinTemporarySelection);
|
||||
// Do not select the cell left of the "addEmptyFunction" cell
|
||||
if (isAddEmptyRow(selectedRow()) && selectedColumn() == 0) {
|
||||
if (!withinTemporarySelection && isAddEmptyRow(selectedRow()) && selectedColumn() == 0) {
|
||||
t->selectCellAtLocation(1, numberOfRows()-1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user