2
0
Эх сурвалжийг харах

Fix AnimatedSprite frame property slider in editor

Hiroshi Ogawa 8 жил өмнө
parent
commit
130ad806f8

+ 1 - 3
scene/2d/animated_sprite.cpp

@@ -298,10 +298,8 @@ void AnimatedSprite::_validate_property(PropertyInfo &property) const {
 
 
 		property.hint = PROPERTY_HINT_SPRITE_FRAME;
 		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";
 			property.hint_string = "0," + itos(frames->get_frame_count(animation) - 1) + ",1";
-		} else {
-			property.hint_string = "0,0,0";
 		}
 		}
 	}
 	}
 }
 }