Browse Source

Fix detection of non-default and overridden property values in scenes

Pedro J. Estébanez 5 năm trước cách đây
mục cha
commit
a02bb2b598
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      scene/property_utils.cpp

+ 1 - 1
scene/property_utils.cpp

@@ -44,7 +44,7 @@ bool PropertyUtils::is_property_value_different(const Variant &p_a, const Varian
 		// For our purposes, treating null object as NIL is the right thing to do
 		// For our purposes, treating null object as NIL is the right thing to do
 		const Variant &a = p_a.get_type() == Variant::OBJECT && (Object *)p_a == nullptr ? Variant() : p_a;
 		const Variant &a = p_a.get_type() == Variant::OBJECT && (Object *)p_a == nullptr ? Variant() : p_a;
 		const Variant &b = p_b.get_type() == Variant::OBJECT && (Object *)p_b == nullptr ? Variant() : p_b;
 		const Variant &b = p_b.get_type() == Variant::OBJECT && (Object *)p_b == nullptr ? Variant() : p_b;
-		return a != b;
+		return !a.deep_equal(b);
 	}
 	}
 }
 }