Don't allow duplicate events in ActionMapEditor

This commit is contained in:
Nintorch
2026-02-03 17:15:15 +05:00
parent 0304036bed
commit da2fb043bf
3 changed files with 40 additions and 4 deletions
+2 -2
View File
@@ -170,7 +170,7 @@ void ActionMapEditor::_tree_button_pressed(Object *p_item, int p_column, int p_i
current_action_name = item->get_meta("__name");
current_action_event_index = -1;
event_config_dialog->popup_and_configure(Ref<InputEvent>(), current_action_name);
event_config_dialog->popup_and_configure(Ref<InputEvent>(), current_action_name, current_action);
} break;
case ActionMapEditor::BUTTON_EDIT_EVENT: {
// Action and Action name is located on the parent of the event.
@@ -181,7 +181,7 @@ void ActionMapEditor::_tree_button_pressed(Object *p_item, int p_column, int p_i
Ref<InputEvent> ie = item->get_meta("__event");
if (ie.is_valid()) {
event_config_dialog->popup_and_configure(ie, current_action_name);
event_config_dialog->popup_and_configure(ie, current_action_name, current_action);
}
} break;
case ActionMapEditor::BUTTON_REMOVE_ACTION: {