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