1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +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:
0GreenClover0 2023-08-02 03:40:51 +02:00 committed by Ali Mohammad Pur
parent 059857d26f
commit 259228d8d2
2 changed files with 1 additions and 1 deletions

View file

@ -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>();