diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index b48433c5ce..8d8ada24ab 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -532,7 +532,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt String oldName = fnf.getName(); String suffix = fnf.isDirectory() ? StringUtils.EMPTY : oldName.substring(oldName.lastIndexOf(CoreConstants.DOT), oldName.length()); - oldName = oldName.replace(suffix, StringUtils.EMPTY); + oldName = StringUtils.replaceLast(oldName, suffix, StringUtils.EMPTY); this.setLayout(new BorderLayout()); this.setModal(true); @@ -651,7 +651,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt String oldName = fnf.getName(); String suffix = fnf.isDirectory() ? StringUtils.EMPTY : oldName.substring(oldName.lastIndexOf(CoreConstants.DOT), oldName.length()); - oldName = oldName.replaceAll(suffix, StringUtils.EMPTY); + oldName = StringUtils.replaceLast(oldName, suffix, StringUtils.EMPTY); // 输入为空或者没有修改 if (ComparatorUtils.equals(userInput, oldName)) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java index be62fb5844..487214a80e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java @@ -62,8 +62,7 @@ public class CellElementEditPane extends BasicPane { @Override public void tabChanged(int index) { card.show(center, paneList.get(index).title4PopupWindow()); - paneList.get(index).populateBean(cellelement, ePane);// 设置面板变了,也要populate - paneList.get(index).addAttributeChangeListener(listener); + populate(ePane); if (titleChangeListener != null) { titleChangeListener.fireTitleChange(getSelectedTabName()); }