diff options
author | Hiroshi Ogawa <hi.ogawa.zz@gmail.com> | 2017-10-11 17:46:22 +0900 |
---|---|---|
committer | Hiroshi Ogawa <hi.ogawa.zz@gmail.com> | 2017-10-11 17:49:39 +0900 |
commit | 130ad806f8dd8e22537a8575ab8c779bafeba357 (patch) | |
tree | d7ceb32dd6b88be7aae4417e05092d43e4a1899c /scene/2d | |
parent | da47f58b24daf7920b55dff19cbc484202f1ec37 (diff) |
Fix AnimatedSprite frame property slider in editor
Diffstat (limited to 'scene/2d')
-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"; } } } |