From 132378adb3407b1238c3958070c584fdb3adb6cd Mon Sep 17 00:00:00 2001 From: syeyoung Date: Mon, 26 Jul 2021 11:18:24 +0900 Subject: Fix tabbed pane not setting parent Fix RoomMatcher only detecting for rotation=1 --- src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java | 1 + src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java | 1 + 2 files changed, 2 insertions(+) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java index 0f842b34..84cccdf5 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java @@ -101,6 +101,7 @@ public class MPanel { } public void remove(MPanel panel) { + if (panel != null) panel.setParent(null); this.childComponents.remove(panel); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java index f26fd956..ba56679b 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java @@ -67,6 +67,7 @@ public class MTabbedPane extends MPanel { panel2.add(panel); panel2.setBackgroundColor(background2); tabs.put(tab, panel2); + panel2.setParent(this); panel2.setBounds(new Rectangle(1,16,getBounds().width-2, getBounds().height-17)); FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; -- cgit