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/editor_resource_preview.cpp | |
parent | b494de34aa28e6c562e5ac8e767db1245b37bd8f (diff) | |
download | redot-engine-a08906112077df67407765e7319068d03d36961b.tar.gz |
Fix pixelized previews, but also instances of breaking ImageTexture cache. Closes #25378.
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r-- | editor/editor_resource_preview.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 368efbc48f..f77f31db80 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -159,6 +159,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref< small_thumbnail_size *= EDSCALE; Ref<Image> small_image = r_texture->get_data(); + small_image = small_image->duplicate(); small_image->resize(small_thumbnail_size, small_thumbnail_size, Image::INTERPOLATE_CUBIC); r_small_texture.instance(); r_small_texture->create_from_image(small_image); |