Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/10 00:20:29 (14 years ago)
Author:
swagner
Message:

Refactored enabling and disabling of save buttons and menu items to prevent saving of running algorithms (#685)

File:
1 edited

Legend:

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

    r2960 r2961  
    2424using System.Drawing;
    2525using System.Windows.Forms;
    26 using HeuristicLab.Core;
    27 using HeuristicLab.Core.Views;
    2826using HeuristicLab.MainForm;
    2927
     
    5149    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    5250      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    53       bool enable = activeView != null;
    54       ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView;
    55       if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations;
    56       ToolStripItem.Enabled = enable;
     51      ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
    5752    }
    5853
Note: See TracChangeset for help on using the changeset viewer.