From 8aaed6bc8d7481cfb30b055dcd14c6416bfed098 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Mon, 11 Dec 2023 20:12:39 -0600 Subject: [PATCH] Fix importing action presets not correctly preventing duplicate names --- lib/pages/editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/editor.rb b/lib/pages/editor.rb index fc7c6c5..e6bab43 100644 --- a/lib/pages/editor.rb +++ b/lib/pages/editor.rb @@ -170,7 +170,7 @@ module TAC button get_image("#{TAC::MEDIA_PATH}/icons/import.png"), image_width: THEME_ICON_SIZE, tip: "Import action from preset" do if @active_group push_state(Dialog::PickPresetDialog, title: "Pick Action Preset", limit: :actions, callback_method: proc { |preset| - push_state(Dialog::ActionDialog, title: "Name Action", action: preset, accept_label: "Add", list: @active_group.actions, callback_method: proc { |action, name, comment| + push_state(Dialog::ActionDialog, title: "Name Action", action: preset, cloning: true, accept_label: "Add", list: @active_group.actions, callback_method: proc { |action, name, comment| clone = TAC::Config::Action.from_json( JSON.parse( action.to_json, symbolize_names: true )) clone.name = name.to_s clone.comment = comment.to_s