Browse Source

REPORT-83501 多次替换时,下一次会覆盖上一次替换的记录

newui
Destiny.Lin 2 years ago
parent
commit
c558887d03
  1. 6
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java

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

Loading…
Cancel
Save