summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-22 14:13:02 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-22 14:13:02 +0200
commitb56b8e8b4131a979c1dce248083c97fc5ce95d9e (patch)
treef20c97dcb296fe903c8b25e52526d0f7a72fb960
parent1c71313c6bd133e295d6744a220120da859df217 (diff)
parent41b7196ad4516d0b9892de676c85031e05a21cf9 (diff)
downloadredot-engine-b56b8e8b4131a979c1dce248083c97fc5ce95d9e.tar.gz
Merge pull request #94571 from Calinou/editor-curve-preview-fix-scaling
Fix incorrect Curve editor preview thumbnail scaling
-rw-r--r--editor/plugins/curve_editor_plugin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index e54d0c0d1a..180de700b7 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -1071,11 +1071,10 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
return Ref<Texture2D>();
}
- Size2 thumbnail_size = p_size * EDSCALE;
Ref<Image> img_ref;
img_ref.instantiate();
Image &im = **img_ref;
- im.initialize_data(thumbnail_size.x, thumbnail_size.y, false, Image::FORMAT_RGBA8);
+ im.initialize_data(p_size.x, p_size.y, false, Image::FORMAT_RGBA8);
Color line_color = EditorInterface::get_singleton()->get_editor_theme()->get_color(SceneStringName(font_color), EditorStringName(Editor));