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 b2ae3cae09..9d28ff31be 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 @@ -514,7 +514,7 @@ public class ITReplaceMainDialog extends UIDialog { String thirdStr = GeneralUtils.objectToString(northPane.getReplaceExtraSettingComboBox().getSelectedItem()); HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified(true); for (Info info : searchSettingResultList) { - if (info.getContent().isSelected()) { + if (isSupportReplace(info)) { SettingController controller = SettingController.match(firstStr); if (controller != null) { controller.replace(info, secondStr, thirdStr); @@ -549,6 +549,10 @@ public class ITReplaceMainDialog extends UIDialog { } } } + + private boolean isSupportReplace(Info info) { + return info.getContent().isSelected() && !info.getContent().isReplaced(); + } private boolean isSelectSearch(int optionSelected) { return optionSelected == NONE;