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.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 4d53ddb344..2e78b58e11 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -254,7 +254,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
file_dialog->clear_filters();
for (const String &E : valid_extensions) {
- file_dialog->add_filter("*." + E + " ; " + E.to_upper());
+ file_dialog->add_filter("*." + E, E.to_upper());
}
file_dialog->popup_file_dialog();
@@ -534,8 +534,6 @@ void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<Strin
p_vector->insert("Texture2D");
} else if (base == "ShaderMaterial") {
p_vector->insert("Shader");
- } else if (base == "Font") {
- p_vector->insert("FontData");
} else if (base == "Texture2D") {
p_vector->insert("Image");
}
@@ -675,22 +673,12 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_
break;
}
- if (at == "Font" && Ref<FontData>(dropped_resource).is_valid()) {
- Ref<Font> font = edited_resource;
- if (!font.is_valid()) {
- font.instantiate();
- }
- font->add_data(dropped_resource);
- dropped_resource = font;
- break;
- }
-
if (at == "Texture2D" && Ref<Image>(dropped_resource).is_valid()) {
Ref<ImageTexture> texture = edited_resource;
if (!texture.is_valid()) {
texture.instantiate();
}
- texture->create_from_image(dropped_resource);
+ texture->set_image(dropped_resource);
dropped_resource = texture;
break;
}