Browse Source

REPORT-4672 单元格添加控件后删除单元格所在行,右侧属性面板保持不变

master
plough 7 years ago
parent
commit
1e2fdb3455
  1. 8
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  2. 32
      designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  3. 1
      designer/src/com/fr/poly/creator/ECBlockEditor.java

8
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -50,18 +50,18 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
if (!isEditable() && !BaseUtils.isAuthorityEditing()) { if (!isEditable() && !BaseUtils.isAuthorityEditing()) {
return; return;
} }
doOnSelectionChanged(e); refreshPropertyPanes();
} }
}); });
this.addTargetModifiedListener(new TargetModifiedListener() { this.addTargetModifiedListener(new TargetModifiedListener() {
@Override @Override
public void targetModified(TargetModifiedEvent e) { public void targetModified(TargetModifiedEvent e) {
CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); refreshPropertyPanes();
} }
}); });
} }
private void doOnSelectionChanged(SelectionEvent e) { private void refreshPropertyPanes() {
//在编辑权限,所以要更新权限编辑面板 //在编辑权限,所以要更新权限编辑面板
if (BaseUtils.isAuthorityEditing()) { if (BaseUtils.isAuthorityEditing()) {
AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this);
@ -76,7 +76,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
QuickEditorRegion.getInstance().populate(getCurrentEditor()); QuickEditorRegion.getInstance().populate(getCurrentEditor());
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (editingTemplate != null && !editingTemplate.isUpMode()) { if (editingTemplate != null && !editingTemplate.isUpMode()) {
Selection editingSelection = ((ElementCasePaneDelegate)e.getSource()).getSelection(); Selection editingSelection = getSelection();
// 模板初始化完成后,才能初始化超级链接面板 // 模板初始化完成后,才能初始化超级链接面板
HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(ElementCasePaneDelegate.this); hyperlinkGroupPane.populate(ElementCasePaneDelegate.this);

32
designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java

@ -36,32 +36,30 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
this.addSelectionChangeListener(new SelectionListener() { this.addSelectionChangeListener(new SelectionListener() {
@Override @Override
public void selectionChanged(SelectionEvent e) { public void selectionChanged(SelectionEvent e) {
CellElementPropertyPane.getInstance().populate(FormElementCasePaneDelegate.this); refreshPropertyPanes();
QuickEditorRegion.getInstance().populate(getCurrentEditor());
// 超级链接
HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate().
getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(FormElementCasePaneDelegate.this);
// 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this);
EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell());
} }
}); });
this.addTargetModifiedListener(new TargetModifiedListener() { this.addTargetModifiedListener(new TargetModifiedListener() {
@Override @Override
public void targetModified(TargetModifiedEvent e) { public void targetModified(TargetModifiedEvent e) {
CellElementPropertyPane.getInstance().populate(FormElementCasePaneDelegate.this); refreshPropertyPanes();
} }
}); });
} }
// private void populateHyperLinkGroupPane() { private void refreshPropertyPanes() {
// final TemplateElementCase report = this.getEditingElementCase(); CellElementPropertyPane.getInstance().populate(FormElementCasePaneDelegate.this);
// NameJavaScriptGroup nameHyperlinks = ReportHyperlinkGroupPane.getNameJSGroup(this, report); QuickEditorRegion.getInstance().populate(getCurrentEditor());
// HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getHyperLinkPane().populate(nameHyperlinks); // 超级链接
// } HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate().
getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(FormElementCasePaneDelegate.this);
// 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this);
EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell());
}
@Override @Override
protected boolean supportRepeatedHeaderFooter() { protected boolean supportRepeatedHeaderFooter() {

1
designer/src/com/fr/poly/creator/ECBlockEditor.java

@ -47,6 +47,7 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
@Override @Override
public void targetModified(TargetModifiedEvent e) { public void targetModified(TargetModifiedEvent e) {
designer.fireTargetModified(); designer.fireTargetModified();
resetSelectionAndChooseState();
} }
}); });
} }

Loading…
Cancel
Save