Browse Source

Pull request #1837: REPORT-34954 在富文本设置中,未选中数据时直接点击上下标仍然可以同时设置

Merge in DESIGN/design from ~HUGH.C/design:release/10.0 to release/10.0

* commit 'b5ecddf42bff1849d7c5f363569bae5253328cb8':
  REPORT-34954 在富文本设置中,未选中数据时直接点击上下标仍然可以同时设置
feature/big-screen
Hugh.C 4 years ago
parent
commit
47383e36ed
  1. 2
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

2
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -258,6 +258,7 @@ public class RichTextToolBar extends BasicPane{
boolean isSub = RichTextToolBar.this.subPane.isSelected();
MutableAttributeSet attr = new SimpleAttributeSet();
if (!isSub && RichTextToolBar.this.superPane.isSelected()) {
RichTextToolBar.this.superPane.setSelected(false);
StyleConstants.setSuperscript(attr, false);
}
// 调用setCharacterAttributes函数设置文本区选择文本的字体
@ -273,6 +274,7 @@ public class RichTextToolBar extends BasicPane{
// 调用setCharacterAttributes函数设置文本区选择文本的字体
MutableAttributeSet attr = new SimpleAttributeSet();
if (!isSuper && RichTextToolBar.this.subPane.isSelected()) {
RichTextToolBar.this.subPane.setSelected(false);
StyleConstants.setSubscript(attr, false);
}
StyleConstants.setSuperscript(attr, !isSuper);

Loading…
Cancel
Save