Browse Source

Pull request #7726: REPORT-66174 组件复用-tab块组件创建的复用组件,原始尺寸没超过500*300,但是复用组件的尺寸和原始尺寸不一致了

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

* commit 'ba9f7f759dba495e33fed5a9b24a93dd92948a23':
  REPORT-66174 组件复用-tab块组件创建的复用组件,原始尺寸没超过500*300,但是复用组件的尺寸和原始尺寸不一致了
release/10.0
fanglei 3 years ago
parent
commit
f8461e6155
  1. 7
      designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java

7
designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java

@ -8,14 +8,11 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWTitleLayout;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.FormSelection;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.form.share.SharableWidgetProvider;
import com.fr.form.share.bean.ShareLayoutWidget;
import com.fr.form.share.constants.ComponentPath;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
@ -38,9 +35,7 @@ public class ShareComponentUtils {
public static XCreator createXCreator(Widget creatorSource, String shareId, SharableWidgetProvider provider) {
XCreator xCreator;
if (creatorSource instanceof WCardMainBorderLayout) {
xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(500, 300));
} else if (creatorSource instanceof ShareLayoutWidget) {
if (creatorSource instanceof ShareLayoutWidget) {
xCreator = XCreatorUtils.createXCreator(((ShareLayoutWidget) creatorSource).getWidget(), new Dimension(provider.getWidth(), provider.getHeight()));
} else {
xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(provider.getWidth(), provider.getHeight()));

Loading…
Cancel
Save