Browse Source

Pull request #3318: CHART-17822 设计器界面内的图形不小切换到其他图形且不保存,点击撤销键没法返回到切换前的图形

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'e99e80634da5fca18139282df2d1aa3131525bfe':
  REPORT-45689 加上判空
  CHART-17822 设计器界面内的图形不小心切换到其他图形且不保存,点击撤销键没法返回到切换前的图形
feature/big-screen
Hades 4 years ago
parent
commit
5baf91ec0c
  1. 10
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java

10
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -97,6 +97,7 @@ import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.swing.tree.TreePath;
public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<Form> {
private static final String FORM_CARD = "FORM";
@ -623,6 +624,15 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()}));
refreshToolArea();
// 停止编辑 恢复浮层展示
TreePath[] treePaths = FormHierarchyTreePane.getInstance(formDesign).getComponentTree().getSelectedTreePath();
if (treePaths != null) {
for (TreePath path : treePaths) {
if (path != null) {
formDesign.stopEditing(path);
}
}
}
} else {
// 只在报表块里撤销是不需要修改外部form对象的, 因为编辑的是当前报表块.
// 修改了JForm的Target需要同步修改formDesign的Target.

Loading…
Cancel
Save