diff options
| author | Juan Linietsky | 2018-04-08 09:39:03 -0300 |
|---|---|---|
| committer | GitHub | 2018-04-08 09:39:03 -0300 |
| commit | 4ee3f3251dc55ae49c873bc1895cecf75bc0bf8a (patch) | |
| tree | ad5442ba88596748b67ec6834a50b61543c8d916 /core/dictionary.cpp | |
| parent | 8a5fb669ae3590fa1aa3f1fb90d01c3dca843c94 (diff) | |
| parent | 9f6c0c6eaef754f2049ee536c5b38bfdc65fbd08 (diff) | |
| download | godot-4ee3f3251dc55ae49c873bc1895cecf75bc0bf8a.tar.gz godot-4ee3f3251dc55ae49c873bc1895cecf75bc0bf8a.tar.zst godot-4ee3f3251dc55ae49c873bc1895cecf75bc0bf8a.zip | |
Merge pull request #17382 from bojidar-bg/13971-path-array-unsaved
Duplicate Arrays and Dictionaries when instancing scene in editor
Diffstat (limited to '')
| -rw-r--r-- | core/dictionary.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/dictionary.cpp b/core/dictionary.cpp index e3f4aa5f2..ba0de9586 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -211,7 +211,7 @@ const Variant *Dictionary::next(const Variant *p_key) const { return NULL; } -Dictionary Dictionary::duplicate() const { +Dictionary Dictionary::duplicate(bool p_deep) const { Dictionary n; @@ -219,7 +219,7 @@ Dictionary Dictionary::duplicate() const { get_key_list(&keys); for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { - n[E->get()] = operator[](E->get()); + n[E->get()] = p_deep ? operator[](E->get()).duplicate(p_deep) : operator[](E->get()); } return n; |
