diff options
author | timre13 <itorteli13@gmail.com> | 2022-04-15 18:37:24 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-04-27 00:49:54 -0700 |
commit | 14751a4122715d1e60265d2b35bc91f06ce3548b (patch) | |
tree | cccc2da5fec55fe7d2545d1dcfe459e67ad674d8 /Userland | |
parent | 1e65e916fca3a991e86c582cb0bc3dede75061eb (diff) | |
download | serenity-14751a4122715d1e60265d2b35bc91f06ce3548b.zip |
HackStudio: Update window close button on document change
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index c9b2be04bf..7a3741aebb 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -368,6 +368,7 @@ bool HackStudioWidget::open_file(String const& full_filename, size_t line, size_ current_editor().set_focus(true); current_editor().on_cursor_change = [this] { on_cursor_change(); }; + current_editor().on_change = [this] { update_window_title(); }; current_editor_wrapper().on_change = [this] { update_gml_preview(); }; current_editor().set_cursor(line, column); update_gml_preview(); @@ -1588,6 +1589,7 @@ void HackStudioWidget::update_tree_view() void HackStudioWidget::update_window_title() { window()->set_title(String::formatted("{} - {} - Hack Studio", m_current_editor_wrapper->filename_title(), m_project->name())); + window()->set_modified(any_document_is_dirty()); } void HackStudioWidget::update_current_editor_title() |