From 9838d6a5cf257e821c4e6bde2096c690d3c2a236 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Thu, 26 Apr 2018 21:06:46 +0300 Subject: [PATCH] ui: erase "isHovered" ActionButton state when it is hidden Button stucks in "hovered" mode, if click on it causes active Toolwindow tab to change (thus, hiding the toolbar with this button). Or if active tab is changed by hotkey press while button is being hovered. (cherry picked from commit ad8171a577aae0bd3a729171bbeec24beb037454) --- .../com/intellij/openapi/actionSystem/impl/ActionButton.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java index a8b1979f2575..fa1f873b2f92 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionButton.java @@ -204,6 +204,8 @@ public class ActionButton extends JComponent implements ActionButtonComponent, A myPresentation.removePropertyChangeListener(myPresentationListener); myPresentationListener = null; } + myRollover = false; + myMouseDown = false; super.removeNotify(); }