mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] TableView: cellAtLocation returns nullptr if the cell is not
currently displayed
This commit is contained in:
committed by
LeaNumworks
parent
19921ec125
commit
770f0971d7
@@ -125,7 +125,7 @@ int TableView::ContentView::typeIndexFromSubviewIndex(int index, int type) const
|
||||
HighlightCell * TableView::ContentView::cellAtLocation(int x, int y) {
|
||||
int relativeX = x-columnsScrollingOffset();
|
||||
int relativeY = y-rowsScrollingOffset();
|
||||
if (relativeY >= numberOfDisplayableRows() || relativeX >= numberOfDisplayableColumns()) {
|
||||
if (relativeY < 0 || relativeY >= numberOfDisplayableRows() || relativeX < 0 || relativeX >= numberOfDisplayableColumns()) {
|
||||
return nullptr;
|
||||
}
|
||||
int type = m_dataSource->typeAtLocation(x, y);
|
||||
|
||||
Reference in New Issue
Block a user