Browse Source

Pull request #2107: REPORT-37473 多层嵌套的tab模板,如果进行增加删除tab,无法点击删除

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

* commit 'b3f097e78c21bdf604cd690e1949fcc963d647a3':
  REPORT-37473 多层嵌套的tab模板,如果进行增加删除tab,无法点击删除
  REPORT-37473 多层嵌套的tab模板,如果进行增加删除tab,无法点击删除
feature/big-screen
pengda 4 years ago
parent
commit
7648f5db33
  1. 21
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

21
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -258,10 +258,25 @@ public class XCardSwitchButton extends XButton {
int ey = e.getY(); int ey = e.getY();
//获取tab布局的位置,鼠标相对于tab按钮的位置 //获取tab布局的位置,鼠标相对于tab按钮的位置
XLayoutContainer mainLayout = cardLayout.getBackupParent(); Container mainLayout = cardLayout.getBackupParent();
Point point = mainLayout.getLocation(); Point point = mainLayout.getLocation();
double mainX = point.getX(); int y = 0;
double mainY = point.getY(); int x = 0;
//遍历一下,不然是相对位置,嵌套后位置不对
while (mainLayout.getParent() != null){
if(mainLayout instanceof XWCardLayout){
y += mainLayout.getY();
}
mainLayout = mainLayout.getParent();
if(mainLayout instanceof XWCardMainBorderLayout){
x += mainLayout.getX();
y += mainLayout.getY();
}
}
double mainX = point.getX() + x;
double mainY = point.getY() + y;
// 参数界面对坐标的影响 // 参数界面对坐标的影响
JForm jform = (JForm) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JForm jform = (JForm) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();

Loading…
Cancel
Save