mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:45:07 +00:00
Spreadsheet: Fix crash when a row number is selected
This commit is contained in:
parent
e65d54a2fa
commit
1e14b93407
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,10 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet)
|
|||
return on_selection_dropped();
|
||||
|
||||
auto selection = m_table_view->selection().first();
|
||||
// Ignore selecting the row numbers.
|
||||
if (selection.column() == 0)
|
||||
return;
|
||||
|
||||
Position position { m_sheet->column(selection.column() - 1), (size_t)selection.row() };
|
||||
auto& cell = m_sheet->ensure(position);
|
||||
if (on_selection_changed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue