diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-06-30 20:24:33 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-06-30 20:24:33 +0300 |
commit | 680e4707653e22e60bc3f8e22eb8603a65bf2991 (patch) | |
tree | dc60b0fe36155140abb76f45a8a57310751c3a5d /src/main | |
parent | 5f108ee93b32475d254f82032b7919986a7b0706 (diff) | |
download | LibGui-680e4707653e22e60bc3f8e22eb8603a65bf2991.tar.gz LibGui-680e4707653e22e60bc3f8e22eb8603a65bf2991.tar.bz2 LibGui-680e4707653e22e60bc3f8e22eb8603a65bf2991.zip |
Fix #68
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index 4287565..4b7a726 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -70,6 +70,13 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl } /** + * Clears the heavyweight peers of this screen's GUI description. + */ + private void clearPeers() { + description.slots.clear(); + } + + /** * Repositions the root panel. * * @param screenWidth the width of the screen @@ -78,6 +85,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl protected void reposition(int screenWidth, int screenHeight) { WPanel basePanel = description.getRootPanel(); if (basePanel!=null) { + clearPeers(); basePanel.validate(description); backgroundWidth = basePanel.getWidth(); |