HackStudio: Fix update modified document on tab widget

Closes #14297
This commit is contained in:
Federico Guerinoni 2022-08-04 16:23:11 +02:00 committed by Sam Atkins
parent 272917de28
commit 8753dc72e8
Notes: sideshowbarker 2024-07-18 02:13:10 +09:00
4 changed files with 11 additions and 2 deletions

View file

@ -40,6 +40,7 @@ EditorWrapper::EditorWrapper()
m_editor->on_modified_change = [this](bool) {
update_title();
update_editor_window_title();
};
}

View file

@ -21,6 +21,7 @@ void open_file(String const&, size_t line, size_t column);
Project& project();
String currently_open_file();
void set_current_editor_wrapper(RefPtr<EditorWrapper>);
void update_editor_window_title();
void for_each_open_file(Function<void(ProjectFile const&)>);
bool semantic_syntax_highlighting_is_enabled();

View file

@ -79,6 +79,9 @@ public:
static Vector<String> read_recent_projects();
void update_current_editor_title();
void update_window_title();
private:
static constexpr size_t recent_projects_history_size = 15;
@ -160,8 +163,6 @@ private:
void update_gml_preview();
void update_tree_view();
void update_window_title();
void update_current_editor_title();
void on_cursor_change();
void file_renamed(String const& old_name, String const& new_name);

View file

@ -185,6 +185,12 @@ void set_current_editor_wrapper(RefPtr<EditorWrapper> wrapper)
s_hack_studio_widget->set_current_editor_wrapper(wrapper);
}
void update_editor_window_title()
{
s_hack_studio_widget->update_current_editor_title();
s_hack_studio_widget->update_window_title();
}
Locator& locator()
{
return s_hack_studio_widget->locator();