From 9e7679e70fecce6aa8abdb1a7b9eb769bd7a58e7 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Wed, 19 Feb 2025 23:36:52 +0100 Subject: [PATCH] Move check for valid model to actor display instead of identifier list. --- Glamourer/Gui/Tabs/ActorTab/ActorSelector.cs | 7 ++++--- Glamourer/Interop/ObjectManager.cs | 2 +- OtterGui | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Glamourer/Gui/Tabs/ActorTab/ActorSelector.cs b/Glamourer/Gui/Tabs/ActorTab/ActorSelector.cs index 76f0ba4..3269fd2 100644 --- a/Glamourer/Gui/Tabs/ActorTab/ActorSelector.cs +++ b/Glamourer/Gui/Tabs/ActorTab/ActorSelector.cs @@ -91,9 +91,10 @@ public class ActorSelector(ObjectManager objects, ActorManager actors, Ephemeral objects.Update(); _world = new WorldId(objects.Player.Valid ? objects.Player.HomeWorld : (ushort)0); - using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, _defaultItemSpacing); - var skips = ImGuiClip.GetNecessarySkips(ImGui.GetTextLineHeight()); - var remainder = ImGuiClip.FilteredClippedDraw(objects.Identifiers, skips, CheckFilter, DrawSelectable); + using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, _defaultItemSpacing); + var skips = ImGuiClip.GetNecessarySkips(ImGui.GetTextLineHeight()); + var remainder = ImGuiClip.FilteredClippedDraw(objects.Identifiers.Where(p => p.Value.Objects.Any(a => a.Model)), skips, CheckFilter, + DrawSelectable); ImGuiClip.DrawEndDummy(remainder, ImGui.GetTextLineHeight()); } diff --git a/Glamourer/Interop/ObjectManager.cs b/Glamourer/Interop/ObjectManager.cs index b185f4a..47f7ad5 100644 --- a/Glamourer/Interop/ObjectManager.cs +++ b/Glamourer/Interop/ObjectManager.cs @@ -83,7 +83,7 @@ public class ObjectManager( private void HandleIdentifier(ActorIdentifier identifier, Actor character) { - if (!character.Model || !identifier.IsValid) + if (!identifier.IsValid) return; if (!_identifiers.TryGetValue(identifier, out var data)) diff --git a/OtterGui b/OtterGui index 332852f..06422a8 160000 --- a/OtterGui +++ b/OtterGui @@ -1 +1 @@ -Subproject commit 332852ffa81387b59f260781d7e5c967f24d8be2 +Subproject commit 06422a893348a18a013e6dbc558370db8d21a446