This is an automated email from the ASF dual-hosted git repository.

nadment pushed a commit to branch 3779
in repository https://gitbox.apache.org/repos/asf/hop.git

commit d370c453e1b0f3768210b3576b086bf564b8d14a
Author: Nicolas Adment <[email protected]>
AuthorDate: Sat May 25 19:03:22 2024 +0200

    Shortcuts to switch perspective are not working #3779
---
 ui/src/main/java/org/apache/hop/ui/hopgui/HopGuiKeyHandler.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGuiKeyHandler.java 
b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGuiKeyHandler.java
index 211dce33a4..692db20750 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGuiKeyHandler.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGuiKeyHandler.java
@@ -98,10 +98,12 @@ public class HopGuiKeyHandler extends KeyAdapter {
       }
     }
     // If this is attached to a perspective, and it's not active, bail out.
+    // Except if it's shortcut to activate perspective
     if (parentObject instanceof IHopPerspective) {
       IHopPerspective perspective = (IHopPerspective) parentObject;
       try {
-        if (!perspective.isActive()) {
+        // TODO: It's not the best way to check with the method name, but it 
works for now.
+        if (!perspective.isActive() && 
!shortcut.getParentMethodName().equals("activate")) {
           return false;
         }
       } catch (Exception ex) {

Reply via email to