Ver código fonte

Ignore layout and translation changes in Controls outside of tree

Yuri Sizov 3 anos atrás
pai
commit
bcbbbeb050
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      scene/gui/control.cpp

+ 4 - 2
scene/gui/control.cpp

@@ -733,8 +733,10 @@ void Control::_notification(int p_notification) {
 		} break;
 		case NOTIFICATION_TRANSLATION_CHANGED:
 		case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
-			data.is_rtl_dirty = true;
-			_size_changed();
+			if (is_inside_tree()) {
+				data.is_rtl_dirty = true;
+				_size_changed();
+			}
 		} break;
 	}
 }