From 6f29a0c33f1b9700083f7fe60291bde622e3a6d7 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Sun, 10 Nov 2024 19:22:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-138249=20cpt=E6=94=AF=E6=8C=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=9B=BF=E6=8D=A2=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=A6=81=E7=94=A8=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/TableDataTreePane.java | 8 +++++++- .../actions/replace/ui/ITReplaceMainDialog.java | 17 +++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) 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 41674024a1..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 @@ -3,8 +3,10 @@ package com.fr.design.actions.replace.ui; import com.fr.design.actions.replace.action.ITChecker; import com.fr.design.actions.replace.action.ShowSearchResultAction; + import com.fr.design.actions.replace.action.setting.SettingController; import com.fr.design.actions.replace.info.Info; + import com.fr.design.actions.replace.utils.ShowValueUtils; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.UIDialog; @@ -14,18 +16,25 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; + import com.fr.design.mainframe.toast.DesignerToastMsgUtil; import com.fr.design.mainframe.toast.ToastMsgDialog; import com.fr.general.GeneralUtils; + import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; + +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.ArrayList; + import java.util.List; import java.util.regex.Pattern; @@ -117,7 +126,7 @@ public class ITReplaceMainDialog extends UIDialog { northPane.fitScreen(0, 0, width); - } + } /** @@ -557,7 +566,7 @@ public class ITReplaceMainDialog extends UIDialog { } } } - + private boolean isSupportReplace(Info info) { return info.getContent().isSelected() && !info.getContent().isReplaced(); }