Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2960


Ignore:
Timestamp:
03/07/10 23:44:47 (15 years ago)
Author:
swagner
Message:

Enabled saving of all items instead of just those for which the CreatableAttribute is set (#896)

Location:
trunk/sources/HeuristicLab.Optimizer/3.3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs

    r2958 r2960  
    103103    public static void Save() {
    104104      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    105       if ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType()))) {
     105      if (activeView != null) {
    106106        Save(activeView);
    107107      }
     
    120120    public static void SaveAs() {
    121121      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    122       if ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType()))) {
     122      if (activeView != null) {
    123123        SaveAs(activeView);
    124124      }
     
    156156      var views = from v in MainFormManager.MainForm.Views
    157157                  where v is IContentView
    158                   where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType())
    159158                  select v as IContentView;
    160159
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs

    r2958 r2960  
    5050      var views = from v in MainFormManager.MainForm.Views
    5151                  where v is IContentView
    52                   where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType())
    5352                  where ((v is ItemView) && ((ItemView)v).EnableFileOperations) || (!(v is ItemView))
    5453                  select v;
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs

    r2958 r2960  
    4747    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4848      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    49       bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType())));
     49      bool enable = activeView != null;
    5050      ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView;
    5151      if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations;
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs

    r2958 r2960  
    5151    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    5252      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    53       bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType())));
     53      bool enable = activeView != null;
    5454      ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView;
    5555      if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations;
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs

    r2958 r2960  
    4949      var views = from v in MainFormManager.MainForm.Views
    5050                  where v is IContentView
    51                   where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType())
    5251                  where ((v is ItemView) && ((ItemView)v).EnableFileOperations) || (!(v is ItemView))
    5352                  select v;
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs

    r2958 r2960  
    4747    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4848      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    49       bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType())));
     49      bool enable = activeView != null;
    5050      ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView;
    5151      if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations;
Note: See TracChangeset for help on using the changeset viewer.