mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher] Fix selection problem in SelectableTableView
Scenario that caused a problem: Go to Statistics, then "1", "Right", "Right", "Right", OK. The cell does not draw itself as being edited, but its right neighbour does.
This commit is contained in:
@@ -78,6 +78,21 @@ bool SelectableTableView::selectCellAtLocation(int i, int j, bool setFirstRespon
|
||||
selectColumn(i);
|
||||
selectRow(j);
|
||||
|
||||
if (m_delegate) {
|
||||
m_delegate->tableViewDidChangeSelection(this, previousX, previousY);
|
||||
}
|
||||
|
||||
/* We need to scroll:
|
||||
* - After notifying the delegate. For instance,
|
||||
* StorageExpressionModelListController needs to update its memoized cell
|
||||
* height values before any scroll.
|
||||
* - Before setting the first responder. If the first responder is a view, it
|
||||
* might change during the scroll. */
|
||||
|
||||
if (selectedRow() >= 0) {
|
||||
scrollToCell(selectedColumn(), selectedRow());
|
||||
}
|
||||
|
||||
HighlightCell * cell = selectedCell();
|
||||
if (cell) {
|
||||
// Update first responder
|
||||
@@ -89,12 +104,7 @@ bool SelectableTableView::selectCellAtLocation(int i, int j, bool setFirstRespon
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_delegate) {
|
||||
m_delegate->tableViewDidChangeSelection(this, previousX, previousY);
|
||||
}
|
||||
if (selectedRow() >= 0) {
|
||||
scrollToCell(selectedColumn(), selectedRow());
|
||||
}
|
||||
|
||||
cell = selectedCell();
|
||||
if (cell) {
|
||||
cell->setHighlighted(true);
|
||||
|
||||
Reference in New Issue
Block a user