Browse Source

Merge pull request #1859 in DESIGN/design from release/10.0 to bugfix/10.0

* commit 'f3ef48eccfd1f0231d26d191a9d1e24aab31293c':
  REPORT-34954 在富文本设置中,未选中数据时直接点击上下标仍然可以同时设置
  REPORT-35108 && REPORT-34895
bugfix/10.0
superman 4 years ago
parent
commit
6e12f0da83
  1. 7
      designer-base/src/main/java/com/fr/design/actions/file/OpenRecentReportMenuDef.java
  2. 2
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java
  3. 1
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

7
designer-base/src/main/java/com/fr/design/actions/file/OpenRecentReportMenuDef.java

@ -1,6 +1,7 @@
package com.fr.design.actions.file; package com.fr.design.actions.file;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.io.File;
import java.util.List; import java.util.List;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
@ -11,6 +12,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.file.FILEFactory; import com.fr.file.FILEFactory;
import com.fr.file.FileFILE;
/** /**
* Open Resent MenuDef. * Open Resent MenuDef.
@ -68,8 +70,13 @@ public class OpenRecentReportMenuDef extends MenuDef {
* @param e 事件 * @param e 事件
*/ */
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
File file = new File(this.getPath());
if (file.exists()) {
DesignerContext.getDesignerFrame().openTemplate(new FileFILE(file));
} else {
DesignerContext.getDesignerFrame().openTemplate(FILEFactory.createFILE(this.getPath())); DesignerContext.getDesignerFrame().openTemplate(FILEFactory.createFILE(this.getPath()));
} }
}
public String getPath() { public String getPath() {
return this.getName(); return this.getName();

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

1
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -238,6 +238,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
dlg.setModal(false); dlg.setModal(false);
dlg.setVisible(true); dlg.setVisible(true);
dlg.setAlwaysOnTop(true);
} }
private void showDialogAfterAddCellAction() { private void showDialogAfterAddCellAction() {

Loading…
Cancel
Save