mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
reset widget before deleting profile
This commit is contained in:
parent
4b2f649215
commit
ea01e62936
1 changed files with 2 additions and 1 deletions
|
|
@ -248,12 +248,13 @@ internal class ProfileManagerWidget
|
||||||
|
|
||||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Trash))
|
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
|
// DeleteProfile() is sync, it doesn't apply and we are modifying the plugins collection. Will throw below when iterating
|
||||||
profman.DeleteProfile(profile);
|
profman.DeleteProfile(profile);
|
||||||
Task.Run(() => profman.ApplyAllWantStates())
|
Task.Run(() => profman.ApplyAllWantStates())
|
||||||
.ContinueWith(t =>
|
.ContinueWith(t =>
|
||||||
{
|
{
|
||||||
this.Reset();
|
|
||||||
this.installer.DisplayErrorContinuation(t, "Could not refresh profiles.");
|
this.installer.DisplayErrorContinuation(t, "Could not refresh profiles.");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue