mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 11:04:40 +00:00
HackStudio: Make FindInFilesWidget reset when opening new project
Add method to FindInFilesWidget which resets the model in order to clear the output when needed, and use this when a new project is opened.
This commit is contained in:
parent
ff2a1ee8b0
commit
5ca888132d
|
@ -148,5 +148,9 @@ void FindInFilesWidget::focus_textbox_and_select_all()
|
|||
m_textbox->select_all();
|
||||
m_textbox->set_focus(true);
|
||||
}
|
||||
void FindInFilesWidget::reset()
|
||||
{
|
||||
m_result_view->set_model(nullptr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ public:
|
|||
|
||||
void focus_textbox_and_select_all();
|
||||
|
||||
void reset();
|
||||
|
||||
private:
|
||||
explicit FindInFilesWidget();
|
||||
|
||||
|
|
|
@ -199,6 +199,7 @@ void HackStudioWidget::open_project(const String& root_path)
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue