diff options
author | Anilforextra <anilforextra@gmail.com> | 2021-09-23 20:43:43 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2021-09-23 22:26:07 +0545 |
commit | cc51b045da4bf40722d347c6306b2764a1c9d813 (patch) | |
tree | 96323b3b6cd43dbbec3a74a9c09762c911e9dc32 /editor/plugins/animation_player_editor_plugin.cpp | |
parent | 2ec1152b0fda21f2050b30e49630659697a5e68b (diff) |
Construct values only when necessary.
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 18b4966f80..68b143358a 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -120,7 +120,7 @@ void AnimationPlayerEditor::_notification(int p_what) { Ref<Image> autoplay_img = autoplay_icon->get_image(); Ref<Image> reset_img = reset_icon->get_image(); Ref<Image> autoplay_reset_img; - Size2 icon_size = Size2(autoplay_img->get_width(), autoplay_img->get_height()); + Size2 icon_size = autoplay_img->get_size(); autoplay_reset_img.instantiate(); autoplay_reset_img->create(icon_size.x * 2, icon_size.y, false, autoplay_img->get_format()); autoplay_reset_img->blit_rect(autoplay_img, Rect2(Point2(), icon_size), Point2()); |