From 130ad806f8dd8e22537a8575ab8c779bafeba357 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Wed, 11 Oct 2017 17:46:22 +0900 Subject: Fix AnimatedSprite frame property slider in editor --- scene/2d/animated_sprite.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scene') diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index c2edb173d7..5982556c18 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -298,10 +298,8 @@ void AnimatedSprite::_validate_property(PropertyInfo &property) const { property.hint = PROPERTY_HINT_SPRITE_FRAME; - if (frames->has_animation(animation)) { + if (frames->has_animation(animation) && frames->get_frame_count(animation) > 1) { property.hint_string = "0," + itos(frames->get_frame_count(animation) - 1) + ",1"; - } else { - property.hint_string = "0,0,0"; } } } -- cgit v1.2.3