mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
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.
This commit is contained in:
parent
a20f1202a8
commit
b532b2d3ca
Notes:
sideshowbarker
2024-07-19 01:09:18 +09:00
Author: https://github.com/alimpfard
Commit: b532b2d3ca
Pull-request: https://github.com/SerenityOS/serenity/pull/4177
Issue: https://github.com/SerenityOS/serenity/issues/4167
Issue: https://github.com/SerenityOS/serenity/issues/4168
Issue: https://github.com/SerenityOS/serenity/issues/4170
Issue: https://github.com/SerenityOS/serenity/issues/4171
Reviewed-by: https://github.com/awesomekling
1 changed files with 5 additions and 0 deletions
|
@ -175,6 +175,11 @@ void SpreadsheetWidget::load(const StringView& filename)
|
||||||
GUI::MessageBox::show_error(window(), result.error());
|
GUI::MessageBox::show_error(window(), result.error());
|
||||||
return;
|
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()) {
|
while (auto* widget = m_tab_widget->active_widget()) {
|
||||||
m_tab_widget->remove_tab(*widget);
|
m_tab_widget->remove_tab(*widget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue