Browse Source

Pull request #9151: REPORT-73106 将参数面板控件剪切到一个新的cpt,原frm界面就变成和cpt一样

Merge in DESIGN/design from ~BRUCE.DENG/design:bugfix/10.0 to bugfix/10.0

* commit '7dd024fba772db268f96cd3938aece86204ff0d5':
  REPORT-73106 将参数面板控件剪切到一个新的cpt,原frm界面就变成和cpt一样
bugfix/10.0
Bruce.Deng 3 years ago
parent
commit
f70bc88cf5
  1. 18
      designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java

18
designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java

@ -25,7 +25,6 @@ import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormSelection; import com.fr.design.mainframe.FormSelection;
import com.fr.design.mainframe.FormSelectionUtils; import com.fr.design.mainframe.FormSelectionUtils;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -140,11 +139,28 @@ public class SelectionModel {
if (cutSelection != null) { if (cutSelection != null) {
cutSelection.cut2ClipBoard(clipboard); cutSelection.cut2ClipBoard(clipboard);
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_CUTED); designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_CUTED);
setSelectedCreator(hasSelectedParaComponent() ? designer.getParaComponent() : designer.getRootComponent());
designer.repaint(); designer.repaint();
} }
} }
} }
/**
* 判断是否选中参数面板中的组件
* @return boolean
*/
private boolean hasSelectedParaComponent() {
XCreator[] roots = selection.getSelectedCreators();
if (roots.length > 0) {
for (XCreator creator : roots) {
if ((creator.getParent() instanceof XWParameterLayout)) {
return true;
}
}
}
return false;
}
/** /**
* 复制当前选中的组件到剪切板 * 复制当前选中的组件到剪切板
*/ */

Loading…
Cancel
Save