Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7400 for trunk


Ignore:
Timestamp:
01/24/12 12:29:49 (13 years ago)
Author:
ascheibe
Message:

#1765 deactivate close menu item if there are no open views

File:
1 edited

Legend:

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

    r7259 r7400  
    4242
    4343    protected override void OnToolStripItemSet(EventArgs e) {
    44       ToolStripItem.Enabled = !(MainFormManager.MainForm.ActiveView is Sidebar);
     44      ToolStripItem.Enabled = (MainFormManager.MainForm.ActiveView != null) && !(MainFormManager.MainForm.ActiveView is Sidebar);
    4545    }
    4646    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    47       ToolStripItem.Enabled = !(MainFormManager.MainForm.ActiveView is Sidebar);
     47      ToolStripItem.Enabled = (MainFormManager.MainForm.ActiveView != null) && !(MainFormManager.MainForm.ActiveView is Sidebar);
    4848    }
    4949
Note: See TracChangeset for help on using the changeset viewer.