diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-08-24 21:21:21 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-24 19:15:07 +0200 |
commit | 1e14b93407138ede7e48f9dc8c5a85345ead33cc (patch) | |
tree | a2d44e96cb141631555ac624eabf1b8ced108390 /Applications | |
parent | e65d54a2fa997b9facb70e936b7c0ee17d78d3a6 (diff) | |
download | serenity-1e14b93407138ede7e48f9dc8c5a85345ead33cc.zip |
Spreadsheet: Fix crash when a row number is selected
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Spreadsheet/SpreadsheetView.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetView.cpp b/Applications/Spreadsheet/SpreadsheetView.cpp index 6c04212723..ff61ca5c81 100644 --- a/Applications/Spreadsheet/SpreadsheetView.cpp +++ b/Applications/Spreadsheet/SpreadsheetView.cpp @@ -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) |