This commit is contained in:
Jean-Michel Bernard 2021-11-11 00:39:02 -06:00 committed by GitHub
commit c036497bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View file

@ -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;
}

View file

@ -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;
}