|
@@ -194,16 +194,7 @@ void HackStudioWidget::open_project(const String& root_path)
|
|
exit(1);
|
|
exit(1);
|
|
}
|
|
}
|
|
if (m_project) {
|
|
if (m_project) {
|
|
- m_editors_splitter->remove_all_children();
|
|
|
|
- m_all_editor_wrappers.clear();
|
|
|
|
- m_open_files.clear();
|
|
|
|
- m_open_files_vector.clear();
|
|
|
|
- add_new_editor(*m_editors_splitter);
|
|
|
|
- m_find_in_files_widget->reset();
|
|
|
|
- m_todo_entries_widget->clear();
|
|
|
|
- m_terminal_wrapper->clear_including_history();
|
|
|
|
- stop_debugger_if_running();
|
|
|
|
- update_gml_preview();
|
|
|
|
|
|
+ close_current_project();
|
|
}
|
|
}
|
|
m_project = Project::open_with_root_path(root_path);
|
|
m_project = Project::open_with_root_path(root_path);
|
|
VERIFY(m_project);
|
|
VERIFY(m_project);
|
|
@@ -1169,6 +1160,20 @@ void HackStudioWidget::stop_debugger_if_running()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void HackStudioWidget::close_current_project()
|
|
|
|
+{
|
|
|
|
+ m_editors_splitter->remove_all_children();
|
|
|
|
+ m_all_editor_wrappers.clear();
|
|
|
|
+ m_open_files.clear();
|
|
|
|
+ m_open_files_vector.clear();
|
|
|
|
+ add_new_editor(*m_editors_splitter);
|
|
|
|
+ m_find_in_files_widget->reset();
|
|
|
|
+ m_todo_entries_widget->clear();
|
|
|
|
+ m_terminal_wrapper->clear_including_history();
|
|
|
|
+ stop_debugger_if_running();
|
|
|
|
+ update_gml_preview();
|
|
|
|
+}
|
|
|
|
+
|
|
HackStudioWidget::~HackStudioWidget()
|
|
HackStudioWidget::~HackStudioWidget()
|
|
{
|
|
{
|
|
stop_debugger_if_running();
|
|
stop_debugger_if_running();
|