Merge branch 'release-v1.1.12' of gitee.com:jcnc-org/JNotepad into fix-I7XAY8

This commit is contained in:
songdragon 2023-08-30 22:52:50 +08:00
commit 10181fb0d1

View File

@ -45,6 +45,8 @@ public class RenameFile implements EventHandler<ActionEvent> {
File newFile = fileChooser.showSaveDialog(UiUtil.getAppWindow()); File newFile = fileChooser.showSaveDialog(UiUtil.getAppWindow());
if (newFile != null) { if (newFile != null) {
boolean rename = file.renameTo(newFile); boolean rename = file.renameTo(newFile);
// 设置文件数据
jnotepadtab.setUserData(newFile);
if (rename) { if (rename) {
jnotepadtab.setText(newFile.getName()); jnotepadtab.setText(newFile.getName());
logger.info("文件重命名成功"); logger.info("文件重命名成功");