diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 6626905c1f..543886bfa9 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -729,10 +729,16 @@ public class TableDataTreePane extends BasicTableDataTreePane { pasteAction.setEnabled(false); removeAction.setEnabled(false); previewTableDataAction.setEnabled(false); + for (AbstractExtraAction action : extraActions) { + action.setEnabled(false); + } if (op == null || op.interceptButtonEnabled()) { // 保持false状态 return; } + if(getDataTree() != null) { + checkExtraActionEnable(op.getDataMode(), getDataTree().getSelectedTableDataCounts(), getDataTree().hasSelectedIndependentColumns()); + } // 获取选中的数据集数量 int selectioncount = getDataTree().getSelectedTableDataCounts(); if (op.getDataMode() == SERVER_TABLE_DATA) { @@ -756,7 +762,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { } removeAction.setEnabled(true); copyAction.setEnabled(true); - checkExtraActionEnable(op.getDataMode(), selectioncount, getDataTree().hasSelectedIndependentColumns()); + } private void checkExtraActionEnable(int dataMode, int selectioncount, boolean hasSelectedIndependentColumns) { diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java index 07f25920ea..41d24534af 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java @@ -126,7 +126,7 @@ public class ITReplaceMainDialog extends UIDialog { northPane.fitScreen(0, 0, width); - } + } /** @@ -566,7 +566,7 @@ public class ITReplaceMainDialog extends UIDialog { } } } - + private boolean isSupportReplace(Info info) { return info.getContent().isSelected() && !info.getContent().isReplaced(); } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java index 70ef0998f5..89b90a2d15 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java @@ -175,7 +175,7 @@ public class ReplaceUtils { */ public static void replaceChart(ChartCollection chartCollection, List entities) { // 非公式部分 - chartCollection.replace(entities); + chartCollection.replaceTableData(entities); // 公式部分 List formulaInfos = new ArrayList<>(); SearchChartCollectionFormulaAction.getInstance().searchChartCollectionFormula(formulaInfos, new ITContent(), chartCollection);