mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
Merge pull request #927 from uneasyalliance/X_Q_hotkey_fixes
fix for 'x' hotkey preventing 'x' input in dialogs
This commit is contained in:
+3
-1
@@ -90,7 +90,9 @@ public class ExplorerPlugin implements IPlugIn {
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent e) {
|
||||
if (e.getKeyChar() == 'x' && e.getModifiersEx() == 0
|
||||
if (explorerPane != null
|
||||
&& (canvasPanel.hasFocus() || explorerPane.hasFocus())
|
||||
&& e.getKeyChar() == 'x' && e.getModifiersEx() == 0
|
||||
&& ConfigurationManager.getInstance()
|
||||
.readBoolean(ConfigPlugin.PROJECT_EXPLORER, true)) {
|
||||
explorerPane.getSearchField().requestFocusInWindow();
|
||||
|
||||
@@ -80,12 +80,13 @@ public class ComponentTree implements IPlugIn {
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent e) {
|
||||
if ((canvasPanel.hasFocus() || treePanel.hasFocus())
|
||||
&& e.getKeyChar() == 'q'
|
||||
if (treePanel != null
|
||||
&& (canvasPanel.hasFocus() || treePanel.hasFocus())
|
||||
&& e.getKeyChar() == 'q' && e.getModifiersEx() == 0
|
||||
&& ConfigurationManager.getInstance()
|
||||
.readString(ConfigPlugin.COMPONENT_BROWSER, ConfigPlugin.SEARCHABLE_TREE)
|
||||
.equals(ConfigPlugin.SEARCHABLE_TREE)) {
|
||||
getTreePanel().getSearchField().requestFocusInWindow();
|
||||
treePanel.getSearchField().requestFocusInWindow();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user