diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-27 01:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 01:05:18 +0200 |
commit | eaaff9da3178fa515a0f051fda932c1dd04d53db (patch) | |
tree | 56173535c376e0324f89baccf4bc14b2580ead23 /editor/dictionary_property_edit.cpp | |
parent | d8c96461183f0dc3208c3d624674fa4544212ea5 (diff) | |
parent | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (diff) |
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
Diffstat (limited to 'editor/dictionary_property_edit.cpp')
-rw-r--r-- | editor/dictionary_property_edit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp index 9f4096ca02..62b50b16f2 100644 --- a/editor/dictionary_property_edit.cpp +++ b/editor/dictionary_property_edit.cpp @@ -42,7 +42,6 @@ void DictionaryPropertyEdit::_notif_changev(const String &p_v) { void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) { // TODO: Set key of a dictionary is not allowed yet - return; } void DictionaryPropertyEdit::_set_value(const Variant &p_key, const Variant &p_value) { @@ -129,7 +128,7 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val if (type == "key" && index < keys.size()) { const Variant &key = keys[index]; - UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + UndoRedo *ur = EditorNode::get_undo_redo(); ur->create_action(TTR("Change Dictionary Key")); ur->add_do_method(this, "_set_key", key, p_value); @@ -144,7 +143,7 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val if (dict.has(key)) { Variant value = dict[key]; - UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + UndoRedo *ur = EditorNode::get_undo_redo(); ur->create_action(TTR("Change Dictionary Value")); ur->add_do_method(this, "_set_value", key, p_value); |