Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/09/10 12:06:51 (13 years ago)
Author:
epitzer
Message:

disable context menu "Show Value" if value is null or not an IContent (#47)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DebugEngine/OperationContentView.cs

    r5003 r5077  
    241241
    242242    private void executionContextConextMenu_Opening(object sender, System.ComponentModel.CancelEventArgs e) {
    243       bool isParameter = executionContextTreeView.SelectedNode.Tag as IParameter != null;
    244       showValueToolStripMenuItem.Enabled = isParameter;
    245       e.Cancel = !isParameter;
     243      IParameter param = executionContextTreeView.SelectedNode.Tag as IParameter;
     244      if (param != null)
     245        showValueToolStripMenuItem.Enabled = GetParameterValue(param, Content.ExecutionContext) is IContent;
     246      else
     247        e.Cancel = true;
    246248    }
    247249
Note: See TracChangeset for help on using the changeset viewer.