Merge pull request #12018 from hi-ogawa/fix-animated-sprite-frame-property-slider
Fix AnimatedSprite frame property slider in editor
This commit is contained in:
commit
409e58e67a
1 changed files with 1 additions and 3 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue