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. 11
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  2. 7
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

11
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.report.core.ReportUtils;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.JComponent; import javax.swing.*;
import javax.swing.SwingUtilities;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import java.awt.AlphaComposite; import java.awt.AlphaComposite;
import java.awt.Component; import java.awt.Component;
@ -65,7 +64,7 @@ public class FormDesignerUI extends ComponentUI {
* @param c 组件 * @param c 组件
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(final Graphics g, JComponent c) {
XCreator rootComponent = designer.getRootComponent(); XCreator rootComponent = designer.getRootComponent();
this.time = (float)designer.getResolution()/ScreenResolution.getScreenResolution(); this.time = (float)designer.getResolution()/ScreenResolution.getScreenResolution();
if (rootComponent != null) { if (rootComponent != null) {
@ -101,8 +100,14 @@ public class FormDesignerUI extends ComponentUI {
if (designer.getPainter() != null) { if (designer.getPainter() != null) {
// ComponentAdapter和LayoutAdapter提供的额外的Painter,该Painter一般用于提示作用, // ComponentAdapter和LayoutAdapter提供的额外的Painter,该Painter一般用于提示作用,
// 相当于一个浮动层, 要考虑参数面板的高度 // 相当于一个浮动层, 要考虑参数面板的高度
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
designer.getPainter().paint(g, designer.getArea().getHorizontalValue(), designer.getPainter().paint(g, designer.getArea().getHorizontalValue(),
designer.getArea().getVerticalValue() + designer.getParaHeight()); designer.getArea().getVerticalValue() + designer.getParaHeight());
return null;
}
}.execute();
} }
AddingModel addingModel = designer.getAddingModel(); 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 @Override
public void setSelection(Selection selection) { public void setSelection(Selection selection) {
if (!ComparatorUtils.equals(this.selection, selection) || if (!ComparatorUtils.equals(this.selection, selection)
!ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) { || !ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())
|| DesignModeContext.isAuthorityEditing()) {
try { try {
//旧选中内容编辑器释放模板对象 //旧选中内容编辑器释放模板对象
QuickEditor editor = this.getCurrentEditor(); QuickEditor editor = this.getCurrentEditor();
@ -535,9 +536,9 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
FineLoggerFactory.getLogger().info("Nothing to release"); FineLoggerFactory.getLogger().info("Nothing to release");
} }
this.selection = selection; this.selection = selection;
}
fireSelectionChanged(); fireSelectionChanged();
} }
}
public void setOldSelecton(Selection selection) { public void setOldSelecton(Selection selection) {

Loading…
Cancel
Save