mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
Spreadsheet: Set Help window mode to Modeless in the constructor
And don't try to do it every time the Help button is clicked. This fixes a crash when clicking the Help button twice (setting window mode on an already visible window is not supported). This also fixes a situation where when opening the Help window with an action, we didn't set its mode to "Modeless".
This commit is contained in:
parent
059857d26f
commit
259228d8d2
Notes:
sideshowbarker
2024-07-17 05:23:40 +09:00
Author: https://github.com/0GreenClover0 Commit: https://github.com/SerenityOS/serenity/commit/259228d8d2 Pull-request: https://github.com/SerenityOS/serenity/pull/20319 Issue: https://github.com/SerenityOS/serenity/issues/20307 Reviewed-by: https://github.com/LucasChollet ✅
2 changed files with 1 additions and 1 deletions
|
@ -66,6 +66,7 @@ HelpWindow::HelpWindow(GUI::Window* parent)
|
|||
resize(530, 365);
|
||||
set_title("Spreadsheet Functions Help");
|
||||
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-help.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
set_window_mode(GUI::WindowMode::Modeless);
|
||||
|
||||
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
|
||||
widget->set_layout<GUI::VerticalBoxLayout>();
|
||||
|
|
|
@ -55,7 +55,6 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
|
|||
auto docs = sheet_ptr->gather_documentation();
|
||||
auto help_window = HelpWindow::the(window());
|
||||
help_window->set_docs(move(docs));
|
||||
help_window->set_window_mode(GUI::WindowMode::Modeless);
|
||||
help_window->show();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue