diff options
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r-- | editor/create_dialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index fbb61a1614..3469e96a0a 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -125,7 +125,7 @@ bool CreateDialog::_should_hide_type(const String &p_type) const { return true; // Do not show editor nodes. } - if (p_type == base_type) { + if (p_type == base_type && !EditorNode::get_editor_data().get_custom_types().has(p_type)) { return true; // Root is already added. } @@ -138,8 +138,8 @@ bool CreateDialog::_should_hide_type(const String &p_type) const { return true; // Wrong inheritance. } - for (Set<StringName>::Element *E = type_blacklist.front(); E; E = E->next()) { - if (ClassDB::is_parent_class(p_type, E->get())) { + for (const StringName &E : type_blacklist) { + if (ClassDB::is_parent_class(p_type, E)) { return true; // Parent type is blacklisted. } } |