From 42c68b1832d04710c12194753bf8a26a6f954a39 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 8 Dec 2021 10:54:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-62438=20=E8=BF=9C=E7=A8=8B=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E9=94=81=E5=AE=9A=E4=BC=98=E5=8C=96=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=8B=E5=9B=BD=E9=99=85=E5=8C=96=E5=92=8C=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=B1=95=E7=A4=BA=E7=9B=B8=E5=85=B3=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/file/TemplateTreePane.java | 4 ++++ .../com/fr/design/mainframe/DesignerFrameFileDealerPane.java | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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 5e5999fd33..d8fec9259a 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 @@ -224,6 +224,10 @@ public class TemplateTreePane extends JPanel implements FileOperations { } String reportPath = reportletsTree.getSelectedTemplatePath(); final String selectedFilePath = StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, reportPath); + if (WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(selectedFilePath)) { + FineLoggerFactory.getLogger().info("{} has been unlocked", selectedFilePath); + return; + } String lock = node.getLock(); boolean showLockInfo = (lock != null && !lock.equals(node.getUserID())) || WorkContext.getCurrent().get(LockInfoOperator.class).isTplLocked(selectedFilePath); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 7e428612f6..7d33b407e2 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -204,7 +204,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt button.setBorderPainted(false); button.setContentAreaFilled(false); button.set4ToolbarButton(); - button.setToolTipText(Toolkit.i18nText("Fine_Design_Template_Lock_Status")); + button.setToolTipText(Toolkit.i18nText("Fine_Design_Template_Unlock_Tip")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -599,7 +599,8 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt boolean visible = fileNode != null && StringUtils.isNotEmpty(fileNode.getLock()) && WorkContext.getCurrent().isRoot() - && WorkContext.getCurrent().get(LockInfoOperator.class).isUnLockable(); + && WorkContext.getCurrent().get(LockInfoOperator.class).isUnLockable() + && !WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(fileNode.getEnvPath()); rightToolBar.setVisible(visible); } }