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 5e5999fd3..d8fec9259 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 7e428612f..7d33b407e 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); } }