🐛 修复 BUG 重复重命名文件失败
This commit is contained in:
parent
3a8b939cbe
commit
c78a251084
@ -45,6 +45,8 @@ public class RenameFile implements EventHandler<ActionEvent> {
|
||||
File newFile = fileChooser.showSaveDialog(UiUtil.getAppWindow());
|
||||
if (newFile != null) {
|
||||
boolean rename = file.renameTo(newFile);
|
||||
// 设置文件数据
|
||||
jnotepadtab.setUserData(newFile);
|
||||
if (rename) {
|
||||
jnotepadtab.setText(newFile.getName());
|
||||
logger.info("文件重命名成功");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user