diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-12-31 17:56:51 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-31 17:56:51 -0300 |
commit | 6b1849d29b42a624a6f0514067bd8d4e67d68198 (patch) | |
tree | f7844a60db4a11df954bef6549727a8a042f3f4e | |
parent | 565513fb899577b11a1fa3337e479926214eefb9 (diff) |
make json sub-dictionaries shared, fixes #2381
-rw-r--r-- | core/io/json.cpp | 4 | ||||
-rw-r--r-- | tools/editor/array_property_edit.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/io/json.cpp b/core/io/json.cpp index 22c99d0465..475d74c2d5 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -288,7 +288,7 @@ Error JSON::_parse_value(Variant &value,Token& token,const CharType *p_str,int & if (token.type==TK_CURLY_BRACKET_OPEN) { - Dictionary d; + Dictionary d(true); Error err = _parse_object(d,p_str,index,p_len,line,r_err_str); if (err) return err; @@ -296,7 +296,7 @@ Error JSON::_parse_value(Variant &value,Token& token,const CharType *p_str,int & return OK; } else if (token.type==TK_BRACKET_OPEN) { - Array a; + Array a(true); Error err = _parse_array(a,p_str,index,p_len,line,r_err_str); if (err) return err; diff --git a/tools/editor/array_property_edit.cpp b/tools/editor/array_property_edit.cpp index 8c83ed1c9c..66c2782da5 100644 --- a/tools/editor/array_property_edit.cpp +++ b/tools/editor/array_property_edit.cpp @@ -92,6 +92,7 @@ bool ArrayPropertyEdit::_set(const StringName& p_name, const Variant& p_value){ _change_notify(); return true; } + } else if (pn.begins_with("indices")) { if (pn.find("_")!=-1) { |