diff options
author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-10-11 16:28:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 16:28:28 +0200 |
commit | 409e58e67abde4e7af6e43b32c23338e119377fb (patch) | |
tree | eebc9df2d5acc3f1a65c4cbef316997bfc30ef1a /scene | |
parent | 740ef3dc9788d62fc07567149a3768e90af781ce (diff) | |
parent | 130ad806f8dd8e22537a8575ab8c779bafeba357 (diff) |
Merge pull request #12018 from hi-ogawa/fix-animated-sprite-frame-property-slider
Fix AnimatedSprite frame property slider in editor
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/animated_sprite.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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"; } } } |