summaryrefslogtreecommitdiff
path: root/editor/editor_resource_picker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_resource_picker.cpp')
-rw-r--r--editor/editor_resource_picker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 0b38996b2d..acc8b3b6a2 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -256,7 +256,7 @@ void EditorResourcePicker::_update_menu_items() {
paste_valid = ClassDB::is_parent_class(res_type, base) || EditorNode::get_editor_data().script_class_is_parent(res_type, base);
- if (!paste_valid) {
+ if (paste_valid) {
break;
}
}
@@ -438,7 +438,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
}
if (!obj) {
- obj = EditorNode::get_editor_data().instance_custom_type(intype, "Resource");
+ obj = EditorNode::get_editor_data().instantiate_custom_type(intype, "Resource");
}
Resource *resp = Object::cast_to<Resource>(obj);