diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-29 22:13:24 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-29 22:13:24 +0200 |
commit | 46629e1e07a6a5f79288ae421c7b529cb0a10e02 (patch) | |
tree | 15ed167ab1c3e73c652dd529a6b9e8c3d1e65e15 | |
parent | 9b1dbd2556993c451b4bad1d47560ea694436230 (diff) | |
parent | c82003c4740deb102e09b25ff904c2968157936c (diff) | |
download | redot-engine-46629e1e07a6a5f79288ae421c7b529cb0a10e02.tar.gz |
Merge pull request #89346 from bruvzg/tree_crash
Defer `ActionMapEditor::_action_edited` signal to prevent tree updates when tree is blocked.
-rw-r--r-- | editor/action_map_editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 3023c5907a..f70730d540 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -428,6 +428,7 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info // Update Tree... TreeItem *action_item = action_tree->create_item(root); + ERR_FAIL_NULL(action_item); action_item->set_meta("__action", action_info.action); action_item->set_meta("__name", action_info.name); @@ -604,7 +605,7 @@ ActionMapEditor::ActionMapEditor() { action_tree->set_column_custom_minimum_width(1, 80 * EDSCALE); action_tree->set_column_expand(2, false); action_tree->set_column_custom_minimum_width(2, 50 * EDSCALE); - action_tree->connect("item_edited", callable_mp(this, &ActionMapEditor::_action_edited)); + action_tree->connect("item_edited", callable_mp(this, &ActionMapEditor::_action_edited), CONNECT_DEFERRED); action_tree->connect("item_activated", callable_mp(this, &ActionMapEditor::_tree_item_activated)); action_tree->connect("button_clicked", callable_mp(this, &ActionMapEditor::_tree_button_pressed)); main_vbox->add_child(action_tree); |