mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Merge pull request #14754 from willnationsdev/dictionary-copy
Added 'duplicate' function for Dictionary in C++ and API.
This commit is contained in:
commit
e83c502939
6 changed files with 12 additions and 10 deletions
|
@ -228,7 +228,7 @@ protected:
|
|||
|
||||
if (String(p_name) == "type") {
|
||||
|
||||
Dictionary dc = d.copy();
|
||||
Dictionary dc = d.duplicate();
|
||||
dc["type"] = p_value;
|
||||
undo_redo->create_action(TTR("Set Variable Type"));
|
||||
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
|
||||
|
@ -241,7 +241,7 @@ protected:
|
|||
|
||||
if (String(p_name) == "hint") {
|
||||
|
||||
Dictionary dc = d.copy();
|
||||
Dictionary dc = d.duplicate();
|
||||
dc["hint"] = p_value;
|
||||
undo_redo->create_action(TTR("Set Variable Type"));
|
||||
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
|
||||
|
@ -254,7 +254,7 @@ protected:
|
|||
|
||||
if (String(p_name) == "hint_string") {
|
||||
|
||||
Dictionary dc = d.copy();
|
||||
Dictionary dc = d.duplicate();
|
||||
dc["hint_string"] = p_value;
|
||||
undo_redo->create_action(TTR("Set Variable Type"));
|
||||
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue