Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/14/09 00:23:57 (15 years ago)
Author:
swagner
Message:

Continued work on Optimizer (#770)

File:
1 edited

Legend:

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

    r2546 r2555  
    88using HeuristicLab.MainForm.WindowsForms;
    99using HeuristicLab.Common.Resources;
     10using HeuristicLab.Core;
     11using HeuristicLab.Core.Views;
    1012
    1113namespace HeuristicLab.Optimizer.MenuItems {
     
    3133    }
    3234    public override void ActiveViewChanged(object sender, EventArgs e) {
    33       ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
     35      var views = from v in MainFormManager.MainForm.Views
     36                  where v is IItemView
     37                  where CreatableAttribute.IsCreatable(((IItemView)v).Item.GetType())
     38                  select v;
     39      ToolStripItem.Enabled = views.FirstOrDefault() != null;
    3440    }
    3541
Note: See TracChangeset for help on using the changeset viewer.