From 408120739f8d717433bd916c1457a74388e85cb0 Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 26 May 2017 09:34:42 +0800 Subject: [PATCH] PMD --- designer/src/com/fr/grid/GridKeyListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/grid/GridKeyListener.java b/designer/src/com/fr/grid/GridKeyListener.java index 6c82a9dcd1..a7d6eb3545 100644 --- a/designer/src/com/fr/grid/GridKeyListener.java +++ b/designer/src/com/fr/grid/GridKeyListener.java @@ -70,8 +70,9 @@ public class GridKeyListener implements KeyListener { } // Richie:Ctrl + A全选单元格 case KeyEvent.VK_A: - if ((OperatingSystem.isWindows() && evt.isControlDown()) - || OperatingSystem.isMacOS() && evt.isMetaDown()) { + boolean macOS = OperatingSystem.isMacOS() && evt.isMetaDown(); + boolean windows = OperatingSystem.isWindows() && evt.isControlDown(); + if (macOS || windows) { reportPane.setSelection(new CellSelection(0, 0, report.getColumnCount(), report.getRowCount())); isNeedRepaint = true; }