From ea01e629364bab95fc2cb30844538102163130b8 Mon Sep 17 00:00:00 2001 From: goat Date: Mon, 10 Apr 2023 22:54:19 +0200 Subject: [PATCH] reset widget before deleting profile --- .../Internal/Windows/PluginInstaller/ProfileManagerWidget.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs index 0545b1656..6a60f6960 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs @@ -248,12 +248,13 @@ internal class ProfileManagerWidget if (ImGuiComponents.IconButton(FontAwesomeIcon.Trash)) { + this.Reset(); + // DeleteProfile() is sync, it doesn't apply and we are modifying the plugins collection. Will throw below when iterating profman.DeleteProfile(profile); Task.Run(() => profman.ApplyAllWantStates()) .ContinueWith(t => { - this.Reset(); this.installer.DisplayErrorContinuation(t, "Could not refresh profiles."); }); }