Browse Source

Pull request #3500: REPORT-47606 聚合报表拖拽时停止编辑会回退到原位置

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

* commit 'b2a771607b7da8105562265a0380b529dbd95736':
  REPORT-47606 聚合报表拖拽时停止编辑会回退到原位置
feature/big-screen
pengda 4 years ago
parent
commit
269d9c750c
  1. 2
      designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java
  2. 19
      designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java

2
designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java

@ -41,7 +41,7 @@ public class PolyBlockProperPane extends DockingView {
} }
public void update(){ public void update(){
polyBlockProperTable.update(); polyBlockProperTable.setBlockName(this.designer.getEditingTarget());
} }
@Override @Override

19
designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java

@ -111,12 +111,7 @@ public class PolyBlockProperTable extends JPanel {
if (isPopulating || block == null) { if (isPopulating || block == null) {
return; return;
} }
if (blockPropertyPane.getWidgetNameField() != null) { setBlockName(block);
String toSetWidgetName = blockPropertyPane.getWidgetNameField().getText();
if (isBlockNameValid(toSetWidgetName, block.getBlockName())) {
block.setBlockName(toSetWidgetName);
}
}
PolyBoundsGroup boundsgroup = new PolyBoundsGroup(block, designer.getTarget()); PolyBoundsGroup boundsgroup = new PolyBoundsGroup(block, designer.getTarget());
boundsgroup.setValue(x.getValue(), 0, 1); boundsgroup.setValue(x.getValue(), 0, 1);
boundsgroup.setValue(y.getValue(), 1, 1); boundsgroup.setValue(y.getValue(), 1, 1);
@ -125,6 +120,18 @@ public class PolyBlockProperTable extends JPanel {
firePropertyEdit(); firePropertyEdit();
} }
public void setBlockName(TemplateBlock block){
if (isPopulating || block == null || blockPropertyPane == null) {
return;
}
if (blockPropertyPane.getWidgetNameField() != null) {
String toSetWidgetName = blockPropertyPane.getWidgetNameField().getText();
if (isBlockNameValid(toSetWidgetName, block.getBlockName())) {
block.setBlockName(toSetWidgetName);
}
}
}
/** /**
*校验一下要设置的名称不能为空不能重名 *校验一下要设置的名称不能为空不能重名
* *

Loading…
Cancel
Save