diff options
| author | Hiroshi Ogawa | 2017-10-11 17:46:22 +0900 |
|---|---|---|
| committer | Hiroshi Ogawa | 2017-10-11 17:49:39 +0900 |
| commit | 130ad806f8dd8e22537a8575ab8c779bafeba357 (patch) | |
| tree | d7ceb32dd6b88be7aae4417e05092d43e4a1899c | |
| parent | da47f58b24daf7920b55dff19cbc484202f1ec37 (diff) | |
| download | godot-130ad806f8dd8e22537a8575ab8c779bafeba357.tar.gz godot-130ad806f8dd8e22537a8575ab8c779bafeba357.tar.zst godot-130ad806f8dd8e22537a8575ab8c779bafeba357.zip | |
Fix AnimatedSprite frame property slider in editor
| -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 c2edb173d..5982556c1 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"; } } } |
