Browse Source

Merge pull request #1375 in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit 'f933dd70daa702f18aec985ff373c2453033cae7':
  fix
  REPORT-25417 智能添加单元格点击不准确
  REPORT-24604 表单拖动图表与画布块交叉设计器卡死
bugfix/10.0
Hades 5 years ago
parent
commit
6259dba743
  1. 15
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  2. 7
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

15
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -23,8 +23,7 @@ import com.fr.page.WatermarkPainter;
import com.fr.report.core.ReportUtils;
import com.fr.stable.ArrayUtils;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import java.awt.AlphaComposite;
import java.awt.Component;
@ -65,7 +64,7 @@ public class FormDesignerUI extends ComponentUI {
* @param c 组件
*/
@Override
public void paint(Graphics g, JComponent c) {
public void paint(final Graphics g, JComponent c) {
XCreator rootComponent = designer.getRootComponent();
this.time = (float)designer.getResolution()/ScreenResolution.getScreenResolution();
if (rootComponent != null) {
@ -101,8 +100,14 @@ public class FormDesignerUI extends ComponentUI {
if (designer.getPainter() != null) {
// ComponentAdapter和LayoutAdapter提供的额外的Painter,该Painter一般用于提示作用,
// 相当于一个浮动层, 要考虑参数面板的高度
designer.getPainter().paint(g, designer.getArea().getHorizontalValue(),
designer.getArea().getVerticalValue() + designer.getParaHeight());
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
designer.getPainter().paint(g, designer.getArea().getHorizontalValue(),
designer.getArea().getVerticalValue() + designer.getParaHeight());
return null;
}
}.execute();
}
AddingModel addingModel = designer.getAddingModel();

7
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

@ -523,8 +523,9 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
@Override
public void setSelection(Selection selection) {
if (!ComparatorUtils.equals(this.selection, selection) ||
!ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) {
if (!ComparatorUtils.equals(this.selection, selection)
|| !ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())
|| DesignModeContext.isAuthorityEditing()) {
try {
//旧选中内容编辑器释放模板对象
QuickEditor editor = this.getCurrentEditor();
@ -535,8 +536,8 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
FineLoggerFactory.getLogger().info("Nothing to release");
}
this.selection = selection;
fireSelectionChanged();
}
fireSelectionChanged();
}

Loading…
Cancel
Save