diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d8dcf4..a42aa18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ Additions Improvements - Allow comparing Keybind and Combination based on the amount of modifiers they have +Fixes +- Fixed StaticSpriteBatch not resetting its texture when all items are removed + ### MLEM.Ui Additions - Added Element.AutoNavGroup which allows forming groups for auto-navigation diff --git a/MLEM/Graphics/StaticSpriteBatch.cs b/MLEM/Graphics/StaticSpriteBatch.cs index ebfc824..933d71f 100644 --- a/MLEM/Graphics/StaticSpriteBatch.cs +++ b/MLEM/Graphics/StaticSpriteBatch.cs @@ -337,6 +337,8 @@ namespace MLEM.Graphics { if (!this.batching) throw new InvalidOperationException("Not batching"); if (this.items.Remove(item)) { + if (this.items.Count <= 0) + this.texture = null; this.batchChanged = true; return true; }