Signals: filter_changed from ProjectListFilter now is emitted when it's on scene tree to avoid unexpected call

This commit is contained in:
Mateo Miccino 2020-03-06 11:21:14 -03:00
parent 8cb6d5daa4
commit 86b48093eb
1 changed files with 2 additions and 1 deletions

View File

@ -2740,7 +2740,8 @@ void ProjectListFilter::_filter_option_selected(int p_idx) {
FilterOption selected = (FilterOption)(filter_option->get_selected());
if (_current_filter != selected) {
_current_filter = selected;
emit_signal("filter_changed");
if (is_inside_tree())
emit_signal("filter_changed");
}
}