Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/10 21:00:30 (15 years ago)
Author:
mkommend
Message:

implemented ContentViews and propagation of view state changes (ticket #982)

Location:
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems
Files:
4 edited

Legend:

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

    r3376 r3416  
    4848    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4949      ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
    50       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     50      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    5151    }
    5252
    5353    public override void Execute() {
    5454      ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
    55       if ((activeView != null) && (activeView.SaveEnabled)) {
     55      if ((activeView != null) && (!activeView.Locked)) {
    5656        Clipboard<IItem> clipboard = ((OptimizerMainForm)MainFormManager.MainForm).Clipboard;
    5757        clipboard.AddItem((IItem)activeView.Content.Clone());
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs

    r2961 r3416  
    4747    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4848      var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>()
    49                   where v.SaveEnabled
     49                  where !v.Locked
    5050                  select v;
    5151      ToolStripItem.Enabled = views.FirstOrDefault() != null;
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs

    r2961 r3416  
    4545    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4646      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    47       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     47      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    4848    }
    4949
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs

    r2961 r3416  
    4949    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    5050      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    51       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     51      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    5252    }
    5353
Note: See TracChangeset for help on using the changeset viewer.