From aa9212777236cd5d08f7dd249e50bb0b1d0c7483 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Tue, 17 Aug 2021 18:30:56 +0200 Subject: [PATCH] Call Cache.Update every time it gets drawn, not only if the list is nonempty. --- Penumbra/UI/MenuTabs/TabInstalled/TabInstalledSelector.cs | 8 ++------ Penumbra/UI/MenuTabs/TabSettings.cs | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledSelector.cs b/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledSelector.cs index 191e2491..9ad30234 100644 --- a/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledSelector.cs +++ b/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledSelector.cs @@ -744,9 +744,9 @@ namespace Penumbra.UI public void Draw() { - if( Cache.Count == 0 ) + if( Cache.Update() && Mod != null ) { - return; + SelectModByDir( Mod.Data.BasePath.Name ); } try @@ -764,10 +764,6 @@ namespace Penumbra.UI true, ImGuiWindowFlags.HorizontalScrollbar ); ImGui.PushStyleVar( ImGuiStyleVar.IndentSpacing, 12.5f ); - if( Cache.Update() && Mod != null ) - { - SelectModByDir( Mod.Data.BasePath.Name ); - } var modIndex = 0; DrawFolderContent( _modManager.StructuredMods, ref modIndex ); diff --git a/Penumbra/UI/MenuTabs/TabSettings.cs b/Penumbra/UI/MenuTabs/TabSettings.cs index 9feaebe1..9439da72 100644 --- a/Penumbra/UI/MenuTabs/TabSettings.cs +++ b/Penumbra/UI/MenuTabs/TabSettings.cs @@ -241,8 +241,6 @@ namespace Penumbra.UI "The number of frames penumbra waits after some events (like zone changes) until it starts trying to redraw actors again, in a range of [1, 3001].\n" + "Keep this as low as possible while producing stable results." ); } - - ; } }