1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-24 17:29:23 +01:00

Fixed StaticSpriteBatch not resetting its texture when all items are removed

This commit is contained in:
Ell 2022-06-07 11:57:25 +02:00
parent 42993f1a0b
commit 7d9633d989
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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;
}