Browse Source

REPORT-4634 组件叠加体验优化=>1=>点击控件树退出绝对布局编辑

master
plough 7 years ago
parent
commit
26a7a453f9
  1. 2
      designer_form/src/com/fr/design/mainframe/ComponentTree.java
  2. 2
      designer_form/src/com/fr/design/mainframe/EditingMouseListener.java
  3. 6
      designer_form/src/com/fr/design/mainframe/FormDesigner.java

2
designer_form/src/com/fr/design/mainframe/ComponentTree.java

@ -53,7 +53,7 @@ public class ComponentTree extends JTree {
public void setSelectionPath(TreePath path) { public void setSelectionPath(TreePath path) {
// 不管点击哪一项,都要先退出编辑状态(图表、报表块、绝对布局、tab块) // 不管点击哪一项,都要先退出编辑状态(图表、报表块、绝对布局、tab块)
// getSelectionModel().setSelectionPath(path); // getSelectionModel().setSelectionPath(path);
designer.stopEditing(); designer.stopEditing(path);
super.setSelectionPath(path); super.setSelectionPath(path);
} }

2
designer_form/src/com/fr/design/mainframe/EditingMouseListener.java

@ -489,7 +489,7 @@ public class EditingMouseListener extends MouseInputAdapter {
return false; return false;
} }
private XCreator processTopLayoutMouseClick(XCreator creator) { public XCreator processTopLayoutMouseClick(XCreator creator) {
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout(); XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout();
if (topLayout != null) { if (topLayout != null) {
if (clickTopLayout != null && !clickTopLayout.equals(topLayout) && !isCreatorInLayout(clickTopLayout, if (clickTopLayout != null && !clickTopLayout.equals(topLayout) && !isCreatorInLayout(clickTopLayout,

6
designer_form/src/com/fr/design/mainframe/FormDesigner.java

@ -1236,8 +1236,12 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
@Override @Override
public void stopEditing() { public void stopEditing() {
// do nothing // do nothing
}
public void stopEditing(TreePath path) {
// do nothing
editingMouseListener.stopEditing(); editingMouseListener.stopEditing();
// editingMouseListener.processTopLayoutMouseClick() editingMouseListener.processTopLayoutMouseClick((XCreator) path.getLastPathComponent());
} }
/** /**

Loading…
Cancel
Save