Skip to content

Commit

Permalink
Merge pull request #26033 from karliss/project-import
Browse files Browse the repository at this point in the history
Fix project opening while filter is applied.
  • Loading branch information
akien-mga authored Feb 19, 2019
2 parents 29fd942 + bb3429c commit e9b854b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions editor/project_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,7 @@ void ProjectManager::_on_projects_updated() {
}

void ProjectManager::_on_project_created(const String &dir) {
project_filter->clear();
bool has_already = false;
for (int i = 0; i < scroll_children->get_child_count(); i++) {
HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_children->get_child(i));
Expand Down Expand Up @@ -2235,3 +2236,9 @@ ProjectListFilter::ProjectListFilter() {

has_search_box = false;
}

void ProjectListFilter::clear() {
if (has_search_box) {
search_box->clear();
}
}
1 change: 1 addition & 0 deletions editor/project_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class ProjectListFilter : public HBoxContainer {
FilterOption get_filter_option();
void set_filter_option(FilterOption);
ProjectListFilter();
void clear();
};

#endif // PROJECT_MANAGER_H

0 comments on commit e9b854b

Please sign in to comment.