You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add some codes, returnes directly if the value is not changed.
Avoid executing the following value-changed logics if the value does not really change.
This commit is contained in:
@@ -246,6 +246,11 @@ void GridContainer::_notification(int p_what) {
|
||||
|
||||
void GridContainer::set_columns(int p_columns) {
|
||||
ERR_FAIL_COND(p_columns < 1);
|
||||
|
||||
if (columns == p_columns) {
|
||||
return;
|
||||
}
|
||||
|
||||
columns = p_columns;
|
||||
queue_sort();
|
||||
update_minimum_size();
|
||||
|
||||
Reference in New Issue
Block a user