Browse Source

REPORT-64267 【主题优化】拖入数据列以后,双击打开点击确定,数据列没了

【问题原因】
FormatPane并不一定会被注册GlobalNameListener,所以需要
进行判空处理,避免抛出异常

【改动思路】
同上
feature/x
Starryi 3 years ago
parent
commit
51b9bfb372
  1. 16
      designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java

16
designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java

@ -372,11 +372,21 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName
* update * update
*/ */
public Style update(Style style) { public Style update(Style style) {
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), "textField") return updateByGlobalNamedSetting(style);
|| ComparatorUtils.equals(globalNameListener.getGlobalName(), "typeComboBox") }
|| ComparatorUtils.equals(globalNameListener.getGlobalName(), "roundingBox")) {
private Style updateByGlobalNamedSetting(Style style) {
if (globalNameListener != null) {
String[] alterSettingNames = new String[] {"typeComboBox", "textField", "roundingBox"};
String globalSettingName = globalNameListener.getGlobalName();
if (StringUtils.isNotEmpty(globalSettingName)) {
for (String alterSettingName : alterSettingNames) {
if (ComparatorUtils.equals(alterSettingName, globalSettingName)) {
return style.deriveFormat(this.update()); return style.deriveFormat(this.update());
} }
}
}
}
return style; return style;
} }

Loading…
Cancel
Save