1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

Spreadsheet: Do not assume that a worksheet always exists

Fixes #5910.
Fixes #4822 (as far as I can tell).
This commit is contained in:
AnotherTest 2021-03-22 17:32:21 +04:30 committed by Andreas Kling
parent 534626f917
commit ba2df70eab
4 changed files with 63 additions and 30 deletions

View file

@ -108,8 +108,7 @@ class SpreadsheetView final : public GUI::Widget {
public:
~SpreadsheetView();
const Sheet& sheet() const { return *m_sheet; }
Sheet& sheet() { return *m_sheet; }
Sheet* sheet_if_available() { return m_sheet; }
const GUI::ModelIndex* cursor() const
{