diff --git a/Dalamud/Interface/Windowing/Persistence/PresetModel.cs b/Dalamud/Interface/Windowing/Persistence/PresetModel.cs
index db91bad8a..f7910e0b2 100644
--- a/Dalamud/Interface/Windowing/Persistence/PresetModel.cs
+++ b/Dalamud/Interface/Windowing/Persistence/PresetModel.cs
@@ -49,5 +49,13 @@ internal class PresetModel
///
[JsonProperty("a")]
public float? Alpha { get; set; }
+
+ ///
+ /// Gets a value indicating whether this preset is in the default state.
+ ///
+ public bool IsDefault =>
+ !this.IsPinned &&
+ !this.IsClickThrough &&
+ !this.Alpha.HasValue;
}
}
diff --git a/Dalamud/Interface/Windowing/Persistence/WindowSystemPersistence.cs b/Dalamud/Interface/Windowing/Persistence/WindowSystemPersistence.cs
index 8b884b0e5..a64928003 100644
--- a/Dalamud/Interface/Windowing/Persistence/WindowSystemPersistence.cs
+++ b/Dalamud/Interface/Windowing/Persistence/WindowSystemPersistence.cs
@@ -41,7 +41,17 @@ internal class WindowSystemPersistence : IServiceType
/// The preset window instance.
public void SaveWindow(uint id, PresetModel.PresetWindow window)
{
- this.ActivePreset.Windows[id] = window;
+ // If the window is in the default state, don't save it to avoid saving every possible window
+ // if the user has not customized anything.
+ if (window.IsDefault)
+ {
+ this.ActivePreset.Windows.Remove(id);
+ }
+ else
+ {
+ this.ActivePreset.Windows[id] = window;
+ }
+
this.config.QueueSave();
}
}