diff options
author | Lennon Donaghy <donaghylennon@gmail.com> | 2022-06-20 18:06:31 +0100 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-06-30 14:38:09 +0100 |
commit | c1b0931d2e81b0fdc471febbbefed77ac05d5d9b (patch) | |
tree | 6a49d4ea6e73cd4510c3610cfbf406d3310c510d | |
parent | d2aafe58c9c2a83465fb7c8fa8d6d0c9a41701d1 (diff) | |
download | serenity-c1b0931d2e81b0fdc471febbbefed77ac05d5d9b.zip |
HackStudio: Properly clear previous editor tabs when closing project
Before this commit the close tab button, which is meant to only
show when more than one tab is open, would be present on the tab
of a new project opened after the first project.
This was due to m_all_editor_tab_widgets not being cleared when closing
the first project. This is now cleared when close_current_project() is
called.
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 96f50ea8ae..ce54329954 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -1543,8 +1543,9 @@ void HackStudioWidget::stop_debugger_if_running() void HackStudioWidget::close_current_project() { m_editors_splitter->remove_all_children(); - add_new_editor_tab_widget(*m_editors_splitter); + m_all_editor_tab_widgets.clear(); m_all_editor_wrappers.clear(); + add_new_editor_tab_widget(*m_editors_splitter); m_open_files.clear(); m_open_files_vector.clear(); m_find_in_files_widget->reset(); |