From f7a5aabd67317475449e23374d10864f60d24526 Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Mon, 28 Jun 2021 19:49:33 +0200 Subject: [PATCH] MenuItem: Uninstall before the menuItem gets set to null. --- .../com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java | 2 +- .../main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java b/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java index c0819038..7d98c872 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java @@ -65,8 +65,8 @@ public class DarkMenuItemUIBase extends BasicMenuItemUI implements MenuItemUI { @Override public void uninstallUI(JComponent c) { - super.uninstallUI(c); MenuItemLayoutHelper.clearUsedParentClientProperties(menuItem); + super.uninstallUI(c); } @Override diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java index ca2eb3f7..9942e546 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java @@ -53,8 +53,8 @@ public class DarkMenuUI extends BasicMenuUI implements MenuItemUI { @Override public void uninstallUI(JComponent c) { - super.uninstallUI(c); MenuItemLayoutHelper.clearUsedParentClientProperties(menuItem); + super.uninstallUI(c); } @Override