@ -53,7 +53,7 @@ public class ComponentTree extends JTree {
public void setSelectionPath(TreePath path) {
// 不管点击哪一项,都要先退出编辑状态(图表、报表块、绝对布局、tab块)
// getSelectionModel().setSelectionPath(path);
designer.stopEditing();
designer.stopEditing(path);
super.setSelectionPath(path);
}
@ -489,7 +489,7 @@ public class EditingMouseListener extends MouseInputAdapter {
return false;
private XCreator processTopLayoutMouseClick(XCreator creator) {
public XCreator processTopLayoutMouseClick(XCreator creator) {
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout();
if (topLayout != null) {
if (clickTopLayout != null && !clickTopLayout.equals(topLayout) && !isCreatorInLayout(clickTopLayout,
@ -1236,8 +1236,12 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
@Override
public void stopEditing() {
// do nothing
public void stopEditing(TreePath path) {
editingMouseListener.stopEditing();
// editingMouseListener.processTopLayoutMouseClick()
editingMouseListener.processTopLayoutMouseClick((XCreator) path.getLastPathComponent());
/**