Some deduplicator bugfixes.

This commit is contained in:
Ottermandias 2021-01-28 15:18:30 +01:00
parent cc17bb9928
commit dbcc050509
4 changed files with 7 additions and 3 deletions

View file

@ -99,6 +99,7 @@ namespace Penumbra.Models
inOption = true; inOption = true;
foreach (var value in values) foreach (var value in values)
option.AddFile(relName1, value); option.AddFile(relName1, value);
option.OptionFiles.Remove(relName2);
} }
} }
} }

View file

@ -179,7 +179,7 @@ namespace Penumbra.Mods
} }
} }
} }
break; break;
case SelectType.Multi: case SelectType.Multi:
for(var i = 0; i < group.Options.Count; ++i) for(var i = 0; i < group.Options.Count; ++i)
{ {

View file

@ -22,7 +22,8 @@ namespace Penumbra.Mods
PluginLog.LogError( "no basepath has been set on {ResourceModName}", Meta.Name ); PluginLog.LogError( "no basepath has been set on {ResourceModName}", Meta.Name );
return; return;
} }
ModFiles.Clear();
// we don't care about any _files_ in the root dir, but any folders should be a game folder/file combo // we don't care about any _files_ in the root dir, but any folders should be a game folder/file combo
foreach( var dir in ModBasePath.EnumerateDirectories() ) foreach( var dir in ModBasePath.EnumerateDirectories() )
{ {

View file

@ -227,7 +227,9 @@ namespace Penumbra.UI
if( ImGui.Button( ButtonDeduplicate ) ) if( ImGui.Button( ButtonDeduplicate ) )
{ {
new Deduplicator(Mod.Mod.ModBasePath, Meta).Run(); new Deduplicator(Mod.Mod.ModBasePath, Meta).Run();
_selector.SaveCurrentMod(); _selector.SaveCurrentMod();
Mod.Mod.RefreshModFiles();
_base._plugin.ModManager.CalculateEffectiveFileList();
_base._menu._effectiveTab.RebuildFileList(_base._plugin.Configuration.ShowAdvanced); _base._menu._effectiveTab.RebuildFileList(_base._plugin.Configuration.ShowAdvanced);
} }
if( ImGui.IsItemHovered() ) if( ImGui.IsItemHovered() )