diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-11-29 17:27:08 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-30 12:07:45 +0100 |
commit | b532b2d3ca895f1dbc5c74fa7044c2ca7bafdeec (patch) | |
tree | 9b59ebea8472b3bd2a76b7ce9b0cff0fe0e09de1 /Applications | |
parent | a20f1202a8a9659bcf003b03741d2e05f2d46151 (diff) | |
download | serenity-b532b2d3ca895f1dbc5c74fa7044c2ca7bafdeec.zip |
Spreadsheet: Clear callbacks on persistent widgets before tearing tabs down
Otherwise changes to the widgets would cause all sorts of updates on
half-deleted cells.
Fixes #4171.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Spreadsheet/SpreadsheetWidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Applications/Spreadsheet/SpreadsheetWidget.cpp index 36110fbe84..c1f6d448a1 100644 --- a/Applications/Spreadsheet/SpreadsheetWidget.cpp +++ b/Applications/Spreadsheet/SpreadsheetWidget.cpp @@ -175,6 +175,11 @@ void SpreadsheetWidget::load(const StringView& filename) GUI::MessageBox::show_error(window(), result.error()); return; } + + m_tab_widget->on_change = nullptr; + m_cell_value_editor->on_change = nullptr; + m_current_cell_label->set_text(""); + m_should_change_selected_cells = false; while (auto* widget = m_tab_widget->active_widget()) { m_tab_widget->remove_tab(*widget); } |