diff --git a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java index 901a12154e..94983ac79e 100644 --- a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java @@ -335,9 +335,10 @@ public class MultiTemplateTabPane extends JComponent { if (openedTemplate.size() == 0) { DesignerContext.getDesignerFrame().addAndActivateJTemplate(); } else if (option == CloseOption.All){ - DesignerContext.getDesignerFrame().activateJTemplate(openedTemplate.get(0)); + //openedTemplate(0)是JVirtualTemplate时需重新打开 + openedTemplate.get(0).activeOldJTemplate(); } else { - DesignerContext.getDesignerFrame().activateJTemplate(currentTemplate); + currentTemplate.activeOldJTemplate(); } MultiTemplateTabPane.getInstance().repaint(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index e88d0c946c..150c4302f4 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -852,7 +852,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (jt == null || jt.getEditingFILE() == null) { return; } - if (currentTemplateDeactivateFail()) { + if (currentTemplateDeactivateFail(jt)) { return; } jt.addJTemplateActionListener(this); @@ -877,7 +877,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (jt == null || jt.getEditingFILE() == null) { return; } - if (currentTemplateDeactivateFail()) { + if (currentTemplateDeactivateFail(jt)) { return; } getCenterTemplateCardPane().showJTemplate(jt); @@ -939,9 +939,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * * @return 是否停用失败 */ - private boolean currentTemplateDeactivateFail() { + private boolean currentTemplateDeactivateFail(JTemplate jt) { JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - return currentEditingTemplate != null && !currentEditingTemplate.deactivateTemplate(); + return currentEditingTemplate != null && !currentEditingTemplate.deactivateTemplate(jt); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 17a5afb2b6..0efb1de626 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -1373,6 +1373,16 @@ public abstract class JTemplate> } + /** + * 将要激活打开其他模板,使当前模板灭活 + * 默认 do nothing 返回true + * + * @return true:成功停用当前模板 + */ + public boolean deactivateTemplate(JTemplate jTemplate) { + return true; + } + /** * 返回当前支持的超链界面pane * diff --git a/designer-base/src/main/resources/com/fr/design/config/default b/designer-base/src/main/resources/com/fr/design/config/default index f808a82379..b323302824 100644 --- a/designer-base/src/main/resources/com/fr/design/config/default +++ b/designer-base/src/main/resources/com/fr/design/config/default @@ -1 +1,2 @@ Fine-Designer_Login=i7hP48WAcuTrmxfN +Fine-Designer_Reu_Share_CERTIFICATE_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtsz62CPSWXZE/IYZRiAuTSZkw1WOwer8+JFktK0uKLAUuQoBr+UjAMFtRA8W7JgKMDwZy/2liEAiXEOSPU/hrdV8DtT541LnGi1X/hXiRwuttPWYN3L2GYm/d5blU+FBNwghBIrdAxXTzYBc6P4KL/oYXnMdTIrkz8tYkG3QoFQIDAQAB \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/DownloadUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/DownloadUtils.java index a814dfa0aa..a451a9bee1 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/DownloadUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/DownloadUtils.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.share.util; import com.fr.base.theme.FormTheme; import com.fr.design.DesignerEnvManager; import com.fr.design.extra.PluginConstants; +import com.fr.design.login.config.DefaultLoginKeys; import com.fr.form.share.base.CancelCheck; import com.fr.form.share.constants.ShareComponentConstants; import com.fr.ftp.util.Base64; @@ -45,10 +46,7 @@ import java.util.Set; * created by Harrison on 2020/05/27 **/ public class DownloadUtils { - private static final String CERTIFICATE_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtsz62CPSWXZE/IYZRiAuTSZkw\n" + - "1WOwer8+JFktK0uKLAUuQoBr+UjAMFtRA8W7JgKMDwZy/2liEAiXEOSPU/hrdV8D\n" + - "tT541LnGi1X/hXiRwuttPWYN3L2GYm/d5blU+FBNwghBIrdAxXTzYBc6P4KL/oYX\n" + - "nMdTIrkz8tYkG3QoFQIDAQAB"; + private static final String CERTIFICATE_PUBLIC_KEY = DefaultLoginKeys.getInstance().getKey("Fine-Designer_Reu_Share_CERTIFICATE_PUBLIC_KEY"); private static String getReusesUrl() { return StableUtils.pathJoin(OnlineShopUtils.getReuInfoPath(), "file/download"); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetCardTagBoundPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetCardTagBoundPane.java index 22d544c1a6..66ae39cd60 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetCardTagBoundPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetCardTagBoundPane.java @@ -29,7 +29,7 @@ public class WidgetCardTagBoundPane extends WidgetBoundPane { @Override public void initBoundPane() { - cardTagWidth = new UIBoundSpinner(0, Integer.MAX_VALUE, 1); + cardTagWidth = new UIBoundSpinner(0, Integer.MAX_VALUE, 1, 0); cardTagWidth.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size")); this.add(WidgetBoundsPaneFactory.createCardTagBoundPane(cardTagWidth)); }