🐛 修复 BUG 修改配置文件的默认语言后,没有即时刷新
This commit is contained in:
parent
1bd9e17b60
commit
f5fdb925ea
@ -2,6 +2,7 @@ package org.jcnc.jnotepad.controller.event.handler;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import org.jcnc.jnotepad.app.config.LoadLanguageConfig;
|
||||
import org.jcnc.jnotepad.app.config.LoadShortcutKeyConfig;
|
||||
import org.jcnc.jnotepad.tool.LogUtil;
|
||||
import org.jcnc.jnotepad.ui.LineNumberTextArea;
|
||||
@ -46,6 +47,10 @@ public class SaveFile implements EventHandler<ActionEvent> {
|
||||
selectedTab.save();
|
||||
// 如果该文件是配置文件则刷新快捷键
|
||||
if (CONFIG_NAME.equals(selectedTab.getText())) {
|
||||
|
||||
// 刷新语言包
|
||||
View.getInstance().initJnotepadConfig(new LoadLanguageConfig());
|
||||
logger.info("已刷新语言包!");
|
||||
// 初始化快捷键
|
||||
View.getInstance().initJnotepadConfig(new LoadShortcutKeyConfig());
|
||||
logger.info("已刷新快捷键!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user