File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 318
318
---- ----------------------------------------------------------------------------
319
319
function modmgr .dialog_rename_modpack ()
320
320
321
- local mod = filterlist .get_list (modmgr .modlist )[modmgr .selected_mod ]
321
+ local mod = filterlist .get_list (modmgr .global_mods )[modmgr .selected_mod ]
322
322
323
323
local retval =
324
324
" label[1.75,1;" .. fgettext (" Rename Modpack:" ) .. " ]" ..
@@ -672,10 +672,13 @@ end
672
672
function modmgr .handle_rename_modpack_buttons (fields )
673
673
674
674
if fields [" dlg_rename_modpack_confirm" ] ~= nil then
675
- local mod = filterlist .get_list (modmgr .modlist )[modmgr .selected_mod ]
675
+ local mod = filterlist .get_list (modmgr .global_mods )[modmgr .selected_mod ]
676
676
local oldpath = engine .get_modpath () .. DIR_DELIM .. mod .name
677
677
local targetpath = engine .get_modpath () .. DIR_DELIM .. fields [" te_modpack_name" ]
678
678
engine .copy_dir (oldpath ,targetpath ,false )
679
+ modmgr .refresh_globals ()
680
+ modmgr .selected_mod = filterlist .get_current_index (modmgr .global_mods ,
681
+ filterlist .raw_index_by_uid (modmgr .global_mods , fields [" te_modpack_name" ]))
679
682
end
680
683
681
684
return {
You can’t perform that action at this time.
0 commit comments