Browse Source

Merge pull request #871 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '32b73a2c2b1f1e7faf0ae29cbfc0eb6bbf353e03':
  REPORT-16789 【10.0.3回归】权限编辑界面问题
bugfix/10.0
Hades 6 years ago
parent
commit
cf0174fd9e
  1. 14
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java
  3. 3
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

14
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -41,17 +41,17 @@ public class HistoryTemplateListCache implements CallbackEvent {
private List<JTemplate<?, ?>> historyList;
private JTemplate<?, ?> editingTemplate;
private static volatile HistoryTemplateListCache THIS;
private static volatile HistoryTemplateListCache instacne;
public static HistoryTemplateListCache getInstance() {
if (THIS == null) {
if (instacne == null) {
synchronized (HistoryTemplateListCache.class) {
if (THIS == null) {
THIS = new HistoryTemplateListCache();
if (instacne == null) {
instacne = new HistoryTemplateListCache();
}
}
}
return THIS;
return instacne;
}
private HistoryTemplateListCache() {
@ -66,8 +66,8 @@ public class HistoryTemplateListCache implements CallbackEvent {
public void closeSelectedReport(JTemplate<?, ?> selected) {
DesignModuleFactory.clearChartPropertyPane();
DesignTableDataManager.closeTemplate(selected);
//直接关闭模板的时候退出权限编辑
if (DesignModeContext.isAuthorityEditing()) {
//直接关闭模板的时候(当且仅当设计器tab上只剩一个模板)退出权限编辑
if (DesignModeContext.isAuthorityEditing() && historyList.size() <= 1) {
DesignerContext.getDesignerFrame().closeAuthorityEditing();
}
if (contains(selected) == -1) {

5
designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java

@ -30,7 +30,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
// 判断是否切换设计器状态到禁止拷贝剪切
if (jt.getTarget().getAttrMark(DesignBanCopyAttrMark.XML_TAG) != null) {
DesignModeContext.switchTo(DesignerMode.BAN_COPY_AND_CUT);
} else if (!DesignModeContext.isVcsMode()){
} else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing()){
DesignModeContext.switchTo(DesignerMode.NORMAL);
}
DesignerFrameFileDealerPane.getInstance().setCurrentEditingTemplate(jt);
@ -38,7 +38,8 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
component.onLostFocus();
remove(component);
}
add(component = jt, BorderLayout.CENTER);
component = jt;
add(component, BorderLayout.CENTER);
validate();
repaint();
revalidate();

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

@ -12,6 +12,7 @@ import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.TableDataSourceAction;
import com.fr.design.actions.edit.RedoAction;
import com.fr.design.actions.edit.UndoAction;
@ -112,7 +113,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
// 判断是否切换设计器状态到禁止拷贝剪切
if (t.getAttrMark(DesignBanCopyAttrMark.XML_TAG) != null) {
DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.BAN_COPY_AND_CUT);
} else if (!DesignModeContext.isVcsMode()) {
} else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing()) {
DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.NORMAL);
}
this.template = t;

Loading…
Cancel
Save