From 143a711fed50f03aa2456b8be0c09221d00119d5 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 14 Jan 2021 17:44:52 +0800 Subject: [PATCH 1/2] REPORT-46971 release->final --- .../mainframe/widget/ui/FormWidgetCardPane.java | 14 ++++++++++++++ .../ui/WidgetBasicPropertyPaneFactory.java | 16 ---------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 8267c53b8..4ab3fdb74 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -14,13 +14,16 @@ import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; import com.fr.design.dialog.AttrScrollPane; import com.fr.design.dialog.BasicScrollPane; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.FormDesigner; +import com.fr.design.mainframe.JForm; import com.fr.design.widget.DataModify; import com.fr.design.widget.FormWidgetDefinePaneFactoryBase; import com.fr.design.widget.Operator; @@ -147,6 +150,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } }; + freshPropertyMode(innerCreator); if (isExtraWidget) { return; } @@ -159,6 +163,16 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } + private static void freshPropertyMode(XCreator xCreator) { + if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) { + if (xCreator instanceof XWParameterLayout) { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); + } else { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA_WIDGET); + } + } + } + private void initDefinePane() { currentEditorDefinePane = null; XCreator creator = getXCreatorDedicated(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java index a3a34a061..081ca1476 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java @@ -1,10 +1,6 @@ package com.fr.design.mainframe.widget.ui; import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XWParameterLayout; -import com.fr.design.file.HistoryTemplateListCache; -import com.fr.design.mainframe.EastRegionContainerPane; -import com.fr.design.mainframe.JForm; /** * Created by kerry on 2017/9/30. @@ -12,7 +8,6 @@ import com.fr.design.mainframe.JForm; public class WidgetBasicPropertyPaneFactory { public static FormBasicPropertyPane createBasicPropertyPane(XCreator xCreator) { - freshPropertyMode(xCreator); if (xCreator.supportSetVisible() && xCreator.supportSetEnable()) { return new FormBasicWidgetPropertyPane(); } @@ -23,15 +18,4 @@ public class WidgetBasicPropertyPaneFactory { } } - - private static void freshPropertyMode(XCreator xCreator) { - if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) { - if (xCreator instanceof XWParameterLayout) { - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); - } else { - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA_WIDGET); - } - } - } - } From 1b49f1e7d125d7673a04f378b1abceae6ecd00b0 Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 14 Jan 2021 18:19:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-47073=20=E3=80=90=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E5=AE=89=E8=A3=85=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=9C=AC?= =?UTF-8?q?=E6=9D=A5=E5=BA=94=E8=AF=A5=E5=9C=A8=E8=AE=BE=E8=AE=A1=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=8F=B3=E4=BE=A7=E6=98=BE=E7=A4=BA=E7=9A=84=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E4=B8=8D=E6=98=BE=E7=A4=BA=E4=BA=86=20=E3=80=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E5=9C=A8EastRegio?= =?UTF-8?q?nContainerPane=E4=B8=AD=E4=BC=9A=E6=A0=B9=E6=8D=AE=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E4=B8=8D=E5=90=8C=E7=8A=B6=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=85=B6icon=E5=90=8E=E7=BC=80=EF=BC=8C?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E7=9A=84=E6=98=AF=5Fnormal.png/=5Fdisabled.p?= =?UTF-8?q?ng=E7=AD=89=EF=BC=8C=E4=BD=86=E6=98=AF=E5=9C=A8=E6=8D=A2?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E8=BF=AD=E4=BB=A3=E4=B8=AD=EF=BC=8C=E4=B8=BB?= =?UTF-8?q?jar=E9=87=8C=E7=9A=84=E8=BF=99=E9=83=A8=E5=88=86=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E9=83=BD=E6=8D=A2=E6=88=90=E4=BA=86svg=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E7=BB=99=E5=90=8E=E7=BC=80=E6=94=B9=E6=88=90?= =?UTF-8?q?=E4=BA=86=5Fnormal.svg=E7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BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/base/svg/IconUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/base/svg/IconUtils.java b/designer-base/src/main/java/com/fr/base/svg/IconUtils.java index 119471dce..45c11c60c 100644 --- a/designer-base/src/main/java/com/fr/base/svg/IconUtils.java +++ b/designer-base/src/main/java/com/fr/base/svg/IconUtils.java @@ -35,7 +35,12 @@ public class IconUtils { if (resource.contains(SUFFIX_SEPARATOR)) { // 判断是否以.svg结尾 if (resource.endsWith(ICON_SUFFIX_SVG)) { - return SVGIcon.readSVGIcon(resource); + if (IOUtils.readResource(resource) != null) { + return SVGIcon.readSVGIcon(resource); + } + // 适配某些插件里是_normal.png、_selected.png的情况 + String pngResource = resource.replace(ICON_SUFFIX_SVG, ICON_SUFFIX_PNG); + return IOUtils.readIcon(pngResource); } return IOUtils.readIcon(resource); }