You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Defer ActionMapEditor::_action_edited signal to prevent tree updates when tree is blocked.
This commit is contained in:
@@ -428,6 +428,7 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
|
|||||||
// Update Tree...
|
// Update Tree...
|
||||||
|
|
||||||
TreeItem *action_item = action_tree->create_item(root);
|
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("__action", action_info.action);
|
||||||
action_item->set_meta("__name", action_info.name);
|
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_custom_minimum_width(1, 80 * EDSCALE);
|
||||||
action_tree->set_column_expand(2, false);
|
action_tree->set_column_expand(2, false);
|
||||||
action_tree->set_column_custom_minimum_width(2, 50 * EDSCALE);
|
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("item_activated", callable_mp(this, &ActionMapEditor::_tree_item_activated));
|
||||||
action_tree->connect("button_clicked", callable_mp(this, &ActionMapEditor::_tree_button_pressed));
|
action_tree->connect("button_clicked", callable_mp(this, &ActionMapEditor::_tree_button_pressed));
|
||||||
main_vbox->add_child(action_tree);
|
main_vbox->add_child(action_tree);
|
||||||
|
|||||||
Reference in New Issue
Block a user