Revision: 4591
          http://sourceforge.net/p/jump-pilot/code/4591
Author:   edso
Date:     2015-12-08 18:57:03 +0000 (Tue, 08 Dec 2015)
Log Message:
-----------
reenable shortcuts for layernametree, except for the layername textfields

Modified Paths:
--------------
    core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java

Modified: 
core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java
===================================================================
--- core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java     
2015-12-08 17:14:34 UTC (rev 4590)
+++ core/trunk/src/com/vividsolutions/jump/workbench/ui/WorkbenchFrame.java     
2015-12-08 18:57:03 UTC (rev 4591)
@@ -94,6 +94,7 @@
 import javax.swing.event.MenuEvent;
 import javax.swing.event.PopupMenuEvent;
 import javax.swing.event.PopupMenuListener;
+import javax.swing.text.JTextComponent;
 
 import org.apache.log4j.Logger;
 import org.openjump.core.CheckOS;
@@ -482,10 +483,12 @@
         KeyEventDispatcher dispatcher = new KeyEventDispatcher() {
             public boolean dispatchKeyEvent(KeyEvent e) {
                 // hands up, who's got the focus
-                Component c = KeyboardFocusManager
+                Component focussed = KeyboardFocusManager
                         .getCurrentKeyboardFocusManager().getFocusOwner();
                 // traverse through parents, see if we are in a valid one
                 boolean valid = false;
+                //System.out.println("START");
+                Component c = focussed;
                 while (c != null) {
                     //System.out.println(c.getClass());
 
@@ -495,9 +498,9 @@
                         break;
                     }
 
-                    // ignore LayerTree, we have currently no plugin w/ 
shortcuts doing
-                    // anything w/ it, preserving layer name editing shortcuts 
this way
-                    if (c instanceof TreeLayerNamePanel) {
+                    // ignore LayerTree textfields, we have currently no 
plugin w/ shortcuts
+                    // doing anything w/ it, preserving layer name editing 
shortcuts this way
+                    if (c instanceof TreeLayerNamePanel && focussed instanceof 
JTextComponent) {
                       break;
                     }
 


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to