Browse Source

Merge pull request #564 in BA/design from ~PLOUGH/design:release to release

* commit '65f79d656478327be5542307ff5950f334f3fbea':
  REPORT-875 修复立即重启时,没有正常保存xml文件的问题
master
superman 8 years ago
parent
commit
153837d0af
  1. 1
      designer_base/src/com/fr/design/actions/file/PreferenceAction.java
  2. 24
      designer_base/src/com/fr/design/actions/file/PreferencePane.java

1
designer_base/src/com/fr/design/actions/file/PreferenceAction.java

@ -38,6 +38,7 @@ public class PreferenceAction extends UpdateAction {
DesignerEnvManager.getEnvManager().saveXMLFile(); DesignerEnvManager.getEnvManager().saveXMLFile();
JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
jt.refreshToolArea(); jt.refreshToolArea();
preferencePane.showRestartDialog();
} }
}); });

24
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -83,6 +83,8 @@ public class PreferencePane extends BasicPane {
}; };
private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言 private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言
private boolean languageChanged; // 是否修改了设计器语言设置
//设置是否支持undo //设置是否支持undo
private UICheckBox supportUndoCheckBox; private UICheckBox supportUndoCheckBox;
//设置最大撤销次数 //设置最大撤销次数
@ -627,12 +629,11 @@ public class PreferencePane extends BasicPane {
return l; return l;
} }
@Override // 如果语言设置改变了,则显示重启对话框
public BasicDialog showWindow(Window window) { public void showRestartDialog() {
return showWindow(window, new DialogActionAdapter() { if (!languageChanged) {
@Override return;
public void doOk() { }
if (languageComboBox.getSelectedIndex() != designerEnvLanguageIndex) {
int rv = JOptionPane.showOptionDialog( int rv = JOptionPane.showOptionDialog(
null, null,
Inter.getLocText("FR-Designer_Language_Change_Successful"), Inter.getLocText("FR-Designer_Language_Change_Successful"),
@ -647,6 +648,17 @@ public class PreferencePane extends BasicPane {
RestartHelper.restart(); RestartHelper.restart();
} }
} }
@Override
public BasicDialog showWindow(Window window) {
return showWindow(window, new DialogActionAdapter() {
@Override
public void doOk() {
if (languageComboBox.getSelectedIndex() != designerEnvLanguageIndex) {
languageChanged = true;
} else {
languageChanged = false;
}
} }
}); });
} }

Loading…
Cancel
Save