diff --git a/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java b/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java index d355c2420b..5a25ad1ecf 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java @@ -174,18 +174,26 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper FormSelection selection = designer.getSelectionModel().getSelection(); WidgetPropertyUIProvider[] embeddedPropertyUIProviders = null; if (selection != null && selection.getSelectedCreator() != null) { - XCreator xCreator = selection.getSelectedCreator(); - embeddedPropertyUIProviders = xCreator.getWidgetPropertyUIProviders(); - if (xCreator instanceof XWScaleLayout - && ComparatorUtils.equals(((XWScaleLayout) xCreator).getXCreatorCount(), 1) - && ((XWScaleLayout) xCreator).getXCreator(0) instanceof XTextEditor) { - embeddedPropertyUIProviders = ((XWScaleLayout) xCreator).getXCreator(0).getWidgetPropertyUIProviders(); - } + embeddedPropertyUIProviders = getEmbeddedPropertyUIProviders(selection.getSelectedCreator()); } Set set = ExtraDesignClassManager.getInstance().getArray(WidgetPropertyUIProvider.XML_TAG); return ArrayUtils.addAll(embeddedPropertyUIProviders, set.toArray(new WidgetPropertyUIProvider[set.size()])); } + /** + * 获取当前控件扩展的属性tab + * @param xCreator + * @return + */ + private WidgetPropertyUIProvider[] getEmbeddedPropertyUIProviders(XCreator xCreator) { + if (xCreator instanceof XWScaleLayout + && ComparatorUtils.equals(((XWScaleLayout) xCreator).getXCreatorCount(), 1) + && ((XWScaleLayout) xCreator).getXCreator(0) instanceof XTextEditor) { + return ((XWScaleLayout) xCreator).getXCreator(0).getWidgetPropertyUIProviders(); + } + return xCreator.getWidgetPropertyUIProviders(); + } + /** * 判断是将拓展的tab放入属性表还是将原来的tab放入属性表 *