From ef5036fe471ffc9900fef2abbe235a507fa31f91 Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Fri, 8 Nov 2024 18:28:45 -0500 Subject: [PATCH] GP-5117 - Updated the action to show a provider to be a toggle action, hiding the provider if already visible --- .../Docking/src/main/java/docking/ComponentProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java b/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java index 5609532fa5..2a35e40dcb 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java @@ -1100,6 +1100,11 @@ public abstract class ComponentProvider implements HelpDescriptor, ActionContext @Override public void actionPerformed(ActionContext context) { + if (isShowing()) { + setVisible(false); + return; + } + DockingWindowManager myDwm = DockingWindowManager.getInstance(getComponent()); if (myDwm == null) { // this can happen when the tool loses focus