Skip to content

Commit b784b62

Browse files
committed
Merge pull request godotengine#105730 from KoBeWi/a_property_has_not_many_names
Improve Window's `_validate_property()`
2 parents 1f787b6 + 2ed4ed8 commit b784b62

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

scene/main/window.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ void Window::_get_property_list(List<PropertyInfo> *p_list) const {
236236
}
237237

238238
void Window::_validate_property(PropertyInfo &p_property) const {
239-
if (p_property.name == "position" && initial_position != WINDOW_INITIAL_POSITION_ABSOLUTE) {
240-
p_property.usage = PROPERTY_USAGE_NONE;
241-
}
242-
243-
if (p_property.name == "current_screen" && initial_position != WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN) {
244-
p_property.usage = PROPERTY_USAGE_NONE;
245-
}
246-
247-
if (p_property.name == "theme_type_variation") {
239+
if (p_property.name == "position") {
240+
if (initial_position != WINDOW_INITIAL_POSITION_ABSOLUTE) {
241+
p_property.usage = PROPERTY_USAGE_NONE;
242+
}
243+
} else if (p_property.name == "current_screen") {
244+
if (initial_position != WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN) {
245+
p_property.usage = PROPERTY_USAGE_NONE;
246+
}
247+
} else if (p_property.name == "theme_type_variation") {
248248
List<StringName> names;
249249

250250
// Only the default theme and the project theme are used for the list of options.

0 commit comments

Comments
 (0)