mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-26 04:02:27 +00:00
HackStudio: Only refresh Git widget on save if initialized
This commit is contained in:
parent
e46b4e0865
commit
b82a254da0
Notes:
sideshowbarker
2024-07-19 02:21:31 +09:00
Author: https://github.com/itamar8910
Commit: b82a254da0
Pull-request: https://github.com/SerenityOS/serenity/pull/3534
Reviewed-by: https://github.com/awesomekling
3 changed files with 35 additions and 7 deletions
|
@ -489,8 +489,11 @@ static int main_impl(int argc, char** argv)
|
|||
auto save_action = GUI::Action::create("Save", { Mod_Ctrl, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/save.png"), [&](auto&) {
|
||||
if (g_currently_open_file.is_empty())
|
||||
return;
|
||||
|
||||
current_editor().write_to_file(g_currently_open_file);
|
||||
g_git_widget->refresh();
|
||||
|
||||
if (g_git_widget->initialized())
|
||||
g_git_widget->refresh();
|
||||
});
|
||||
|
||||
toolbar.add_action(new_action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue