diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-01-27 13:39:16 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-01-27 13:41:47 -0300 |
commit | a08906112077df67407765e7319068d03d36961b (patch) | |
tree | a8fff5257d9c85ce4ad90a12feee7e85c6a484bc /editor/plugins/asset_library_editor_plugin.cpp | |
parent | b494de34aa28e6c562e5ac8e767db1245b37bd8f (diff) |
Fix pixelized previews, but also instances of breaking ImageTexture cache. Closes #25378.
Diffstat (limited to 'editor/plugins/asset_library_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index a42765df6b..c68023ee9b 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -174,6 +174,7 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const if (preview_images[i].is_video) { Ref<Image> overlay = get_icon("PlayOverlay", "EditorIcons")->get_data(); Ref<Image> thumbnail = p_image->get_data(); + thumbnail = thumbnail->duplicate(); Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2); thumbnail->lock(); |