From 3f29a1be5aa602c1b369a84be1fac7af05cec03a 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 6c82a9dcd..a7d6eb354 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; }