File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
Userland/DevTools/HackStudio Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -194,16 +194,7 @@ void HackStudioWidget::open_project(const String& root_path)
194
194
exit (1 );
195
195
}
196
196
if (m_project) {
197
- m_editors_splitter->remove_all_children ();
198
- m_all_editor_wrappers.clear ();
199
- m_open_files.clear ();
200
- m_open_files_vector.clear ();
201
- add_new_editor (*m_editors_splitter);
202
- m_find_in_files_widget->reset ();
203
- m_todo_entries_widget->clear ();
204
- m_terminal_wrapper->clear_including_history ();
205
- stop_debugger_if_running ();
206
- update_gml_preview ();
197
+ close_current_project ();
207
198
}
208
199
m_project = Project::open_with_root_path (root_path);
209
200
VERIFY (m_project);
@@ -1169,6 +1160,20 @@ void HackStudioWidget::stop_debugger_if_running()
1169
1160
}
1170
1161
}
1171
1162
1163
+ void HackStudioWidget::close_current_project ()
1164
+ {
1165
+ m_editors_splitter->remove_all_children ();
1166
+ m_all_editor_wrappers.clear ();
1167
+ m_open_files.clear ();
1168
+ m_open_files_vector.clear ();
1169
+ add_new_editor (*m_editors_splitter);
1170
+ m_find_in_files_widget->reset ();
1171
+ m_todo_entries_widget->clear ();
1172
+ m_terminal_wrapper->clear_including_history ();
1173
+ stop_debugger_if_running ();
1174
+ update_gml_preview ();
1175
+ }
1176
+
1172
1177
HackStudioWidget::~HackStudioWidget ()
1173
1178
{
1174
1179
stop_debugger_if_running ();
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ class HackStudioWidget : public GUI::Widget {
104
104
105
105
void handle_external_file_deletion (const String& filepath);
106
106
void stop_debugger_if_running ();
107
+ void close_current_project ();
107
108
108
109
void create_open_files_view (GUI::Widget& parent);
109
110
void create_toolbar (GUI::Widget& parent);
You can’t perform that action at this time.
0 commit comments