Fix imgui stalling due to endless open/close popup loop on deleting unselected mod.

This commit is contained in:
Ottermandias 2021-08-07 12:03:44 +02:00
parent 44bbf546f6
commit fb5648b176

View file

@ -121,7 +121,7 @@ namespace Penumbra.UI
{
ImGui.PushFont( UiBuilder.IconFont );
if( ImGui.Button( FontAwesomeIcon.Trash.ToIconString(), SelectorButtonSizes * _selectorFactor ) )
if( ImGui.Button( FontAwesomeIcon.Trash.ToIconString(), SelectorButtonSizes * _selectorFactor ) && _index >= 0 )
{
_deleteIndex = _index;
}
@ -362,6 +362,7 @@ namespace Penumbra.UI
if( Mod == null )
{
_deleteIndex = null;
ImGui.CloseCurrentPopup();
ImGui.EndPopup();
return;