Hacked around duplication bug. I think duplicate needs to be even smarter, maybe pass two bools? (containers and/or resources)

This commit is contained in:
Juan Linietsky
2018-07-03 08:34:06 -03:00
parent 7fc2367508
commit d280b14e6e
2 changed files with 19 additions and 14 deletions

View File

@@ -3418,12 +3418,14 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
Variant Variant::duplicate(bool deep) const {
switch (type) {
case OBJECT: {
/* breaks stuff :(
if (deep && !_get_obj().ref.is_null()) {
Ref<Resource> resource = _get_obj().ref;
if (resource.is_valid()) {
return resource->duplicate(true);
}
}
*/
return *this;
} break;
case DICTIONARY: