Fix AnimatedSprite2D & 3D animation list in inspector
This commit is contained in:
parent
70c82d9d3d
commit
07349080a5
|
@ -115,13 +115,17 @@ void AnimatedSprite2D::_validate_property(PropertyInfo &property) const {
|
|||
names.sort_custom<StringName::AlphCompare>();
|
||||
|
||||
bool current_found = false;
|
||||
bool is_first_element = true;
|
||||
|
||||
for (List<StringName>::Element *E = names.front(); E; E = E->next()) {
|
||||
if (E->prev()) {
|
||||
for (const StringName &E : names) {
|
||||
if (!is_first_element) {
|
||||
property.hint_string += ",";
|
||||
} else {
|
||||
is_first_element = false;
|
||||
}
|
||||
|
||||
property.hint_string += String(E->get());
|
||||
property.hint_string += E;
|
||||
|
||||
if (animation == E) {
|
||||
current_found = true;
|
||||
}
|
||||
|
|
|
@ -989,13 +989,17 @@ void AnimatedSprite3D::_validate_property(PropertyInfo &property) const {
|
|||
names.sort_custom<StringName::AlphCompare>();
|
||||
|
||||
bool current_found = false;
|
||||
bool is_first_element = true;
|
||||
|
||||
for (List<StringName>::Element *E = names.front(); E; E = E->next()) {
|
||||
if (E->prev()) {
|
||||
for (const StringName &E : names) {
|
||||
if (!is_first_element) {
|
||||
property.hint_string += ",";
|
||||
} else {
|
||||
is_first_element = false;
|
||||
}
|
||||
|
||||
property.hint_string += String(E->get());
|
||||
property.hint_string += E;
|
||||
|
||||
if (animation == E) {
|
||||
current_found = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue