Fix buggy behavior deleting spawned gpose actors

This commit is contained in:
Loporrit
2025-07-25 15:54:12 +00:00
parent 10366695f2
commit 9fd390caab
3 changed files with 26 additions and 23 deletions

View File

@@ -203,7 +203,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
using var tabs = ImRaii.TabBar("TabsTopLevel");
bool smallUi = false;
_isHandlingSelf = _charaDataManager.HandledCharaData.Any(c => c.IsSelf);
_isHandlingSelf = _charaDataManager.HandledCharaData.Any(c => c.Value.IsSelf);
if (_isHandlingSelf) _openMcdOnlineOnNextRun = false;
using (var gposeTogetherTabItem = ImRaii.TabItem("GPose Together"))
@@ -388,7 +388,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
ImGui.TextUnformatted(CharaName(actor.Name.TextValue));
}
ImGui.SameLine(250);
var handled = _charaDataManager.HandledCharaData.FirstOrDefault(c => string.Equals(c.Name, actor.Name.TextValue, StringComparison.Ordinal));
var handled = _charaDataManager.HandledCharaData.GetValueOrDefault(actor.Name.TextValue);
using (ImRaii.Disabled(handled == null))
{
_uiSharedService.IconText(FontAwesomeIcon.InfoCircle);