diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index fbfe52bdba..74f26aaf80 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -434,7 +434,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { } private void showErrorDialog() { - FineJOptionPane.showConfirmDialog(null, + FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Delete_Failure"), Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.DEFAULT_OPTION, diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java index 7fadaed7a8..6d927b8376 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java @@ -28,8 +28,6 @@ import java.util.ArrayList; import java.util.List; -import static com.fr.design.i18n.Toolkit.i18nText; - /** * 版本中心面板 * @@ -63,7 +61,7 @@ public class VcsCenterPane extends VcsNewPane { Toolkit.i18nText("Fine-Design_Vcs_Operator") }; - private static final String TITLE = i18nText("Fine-Design_Vcs_Center"); + private static final String TITLE = Toolkit.i18nText("Fine-Design_Vcs_Center"); public VcsCenterPane() { super(TITLE, (o, columnIndex) -> { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java index e2b71b3159..7859693336 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java @@ -50,6 +50,8 @@ public class VcsNewPane extends RecyclePane{ protected static int EDIT_COL = 4; + + private static final int DOUBLE_CLICK_COUNT = 2; protected VcsOperatorPane operatorPane; private static final Icon PREVIEW_ICON = IconUtils.readIcon("/com/fr/design/standard/vcslist/vcs_operator_preview"); private static final Icon DELETE_ICON = IconUtils.readIcon("/com/fr/design/standard/vcslist/vcs_operator_delete"); @@ -307,7 +309,7 @@ public class VcsNewPane extends RecyclePane{ table.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - if (e.getClickCount() == 2) { + if (e.getClickCount() == DOUBLE_CLICK_COUNT) { Point point = e.getPoint(); int row = table.rowAtPoint(point); int col = table.columnAtPoint(point);