mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Merge pull request #1084 from wolfcomp/master
This commit is contained in:
commit
91ac86a12a
1 changed files with 13 additions and 1 deletions
|
|
@ -81,13 +81,25 @@ public class WindowSystem
|
|||
if (!this.windows.Contains(window))
|
||||
throw new ArgumentException("This window is not registered on this WindowSystem.");
|
||||
|
||||
if (window is IDisposable disposable)
|
||||
disposable.Dispose();
|
||||
|
||||
this.windows.Remove(window);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove all windows from this <see cref="WindowSystem"/>.
|
||||
/// </summary>
|
||||
public void RemoveAllWindows() => this.windows.Clear();
|
||||
public void RemoveAllWindows()
|
||||
{
|
||||
foreach (var window in this.windows)
|
||||
{
|
||||
if (window is IDisposable disposable)
|
||||
disposable.Dispose();
|
||||
}
|
||||
|
||||
this.windows.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a window by name.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue