|
|
@ -96,11 +96,13 @@ public class FormCreatorDropTarget extends DropTarget { |
|
|
|
boolean formSubmit2Adapt = !addingModel.getXCreator().canEnterIntoAdaptPane() && container.acceptType(XWFitLayout.class); |
|
|
|
boolean formSubmit2Adapt = !addingModel.getXCreator().canEnterIntoAdaptPane() && container.acceptType(XWFitLayout.class); |
|
|
|
|
|
|
|
|
|
|
|
if (model != null && !chartEnter2Para && !formSubmit2Adapt) { |
|
|
|
if (model != null && !chartEnter2Para && !formSubmit2Adapt) { |
|
|
|
|
|
|
|
tabDragInner.tryDragIn(); |
|
|
|
success = model.add2Container(designer, container, x, y); |
|
|
|
success = model.add2Container(designer, container, x, y); |
|
|
|
} |
|
|
|
} |
|
|
|
cancelPromptWidgetForbidEnter(); |
|
|
|
cancelPromptWidgetForbidEnter(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (success) { |
|
|
|
if (success) { |
|
|
|
|
|
|
|
tabDragInner.reset(); |
|
|
|
// 如果添加成功,则触发相应事件
|
|
|
|
// 如果添加成功,则触发相应事件
|
|
|
|
XCreator xCreator = container.acceptType(XWParameterLayout.class) ? designer.getParaComponent() : designer.getRootComponent(); |
|
|
|
XCreator xCreator = container.acceptType(XWParameterLayout.class) ? designer.getParaComponent() : designer.getRootComponent(); |
|
|
|
//SetSelection时要确保选中的是最顶层的布局
|
|
|
|
//SetSelection时要确保选中的是最顶层的布局
|
|
|
@ -143,7 +145,6 @@ public class FormCreatorDropTarget extends DropTarget { |
|
|
|
designer.getSelectionModel().setSelectedCreators( |
|
|
|
designer.getSelectionModel().setSelectedCreators( |
|
|
|
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget})); |
|
|
|
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget})); |
|
|
|
designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED); |
|
|
|
designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED); |
|
|
|
tabDragInner.tryDragIn(); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Toolkit.getDefaultToolkit().beep(); |
|
|
|
Toolkit.getDefaultToolkit().beep(); |
|
|
|
// 拖入失败 取消选中
|
|
|
|
// 拖入失败 取消选中
|
|
|
|