Groups with < 2 dropdown options hide

This commit is contained in:
Minizbot2012 2021-01-16 13:03:51 -05:00
parent 4b48805233
commit c7d4cc7171

View file

@ -632,10 +632,12 @@ namespace Penumbra.UI
case "Single": case "Single":
{ {
var code = conf[g.Key]; var code = conf[g.Key];
if(ImGui.Combo(g.Value.GroupName, ref code, g.Value.Options.Select(x=>x.OptionName).ToArray(), g.Value.Options.ToArray().Length)) { if(g.Value.Options.Count >1) {
conf[g.Key] = code; if(ImGui.Combo(g.Value.GroupName, ref code, g.Value.Options.Select(x=>x.OptionName).ToArray(), g.Value.Options.ToArray().Length)) {
_plugin.ModManager.Mods.Save(); conf[g.Key] = code;
_plugin.ModManager.CalculateEffectiveFileList(); _plugin.ModManager.Mods.Save();
_plugin.ModManager.CalculateEffectiveFileList();
}
} }
break; break;
} }