Browse Source

REPORT-78819 重命名已打开的模板,警告弹窗应该在重命名弹窗的上层等

feature/x
roger 2 years ago
parent
commit
ec5c6549c2
  1. 3
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 4
      designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java
  3. 3
      designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java
  4. 8
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

3
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -1,6 +1,7 @@
package com.fr.design;
import com.fr.common.report.ReportState;
import com.fr.design.mainframe.manager.clip.TemplateTreeClipboard;
import com.fr.design.plugin.remind.PluginErrorDesignReminder;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicDialog;
@ -150,6 +151,8 @@ public class EnvChangeEntrance {
model.envChanged();
}
NotificationCenter.getInstance().clearAllNotifications();
//切换环境后,清空粘贴板里面的内容
TemplateTreeClipboard.getInstance().reset();
return true;
}

4
designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java

@ -238,10 +238,10 @@ public class RenameAction extends UpdateAction {
private void confirmClose() {
if (TemplateUtils.checkSelectedTemplateIsEditing()) {
if (FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
if (FineJOptionPane.showConfirmDialog(this,
Toolkit.i18nText("Fine-Design_Basic_Template_Is_Editing"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
YES_NO_OPTION) == JOptionPane.NO_OPTION) {
YES_NO_OPTION) != JOptionPane.YES_OPTION) {
return;
}
}

3
designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java

@ -217,7 +217,8 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
return false;
}
//确定目标目录并检查权限
if (getDirTree().getSelectionCount() != 0 && !TemplateDirTreePane.getInstance().selectedAccess()) {
FileOperations selectedOperation = DesignerFrameFileDealerPane.getInstance().getSelectedOperation();
if (!selectedOperation.access()) {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),

8
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

@ -15,6 +15,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.TemplateSavingChecker;
import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
@ -258,6 +259,11 @@ public class MutilTempalteTabPane extends JComponent {
@Override
public void actionPerformed(ActionEvent e) {
//处于搜索模式时,先退出搜索模式,再定位
if (TemplateTreeSearchManager.getInstance().isInSearchMode()) {
TemplateTreeSearchManager.getInstance().outOfSearchMode();
TemplateTreePane.getInstance().refreshDockingView();
}
JTemplate<?, ?> template = openedTemplate.get(this.tplIndex);
super.gotoEditingTemplateLeaf(template.getPath());
}
@ -287,7 +293,7 @@ public class MutilTempalteTabPane extends JComponent {
JTemplate<?, ?> currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
closeTemplate(templates, currentTemplate);
if (currentTemplate == null) {
if (option == CloseOption.All) {
DesignerContext.getDesignerFrame().addAndActivateJTemplate();
} else {
DesignerContext.getDesignerFrame().activateJTemplate(currentTemplate);

Loading…
Cancel
Save