Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/10 05:14:39 (14 years ago)
Author:
swagner
Message:

Worked on the refactoring of saving and loading items (#990)

File:
1 edited

Legend:

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

    r3416 r3483  
    3939      get { return 2100; }
    4040    }
    41     public override Keys ShortCutKeys {
    42       get { return Keys.Control | Keys.C; }
    43     }
    4441
    4542    protected override void OnToolStripItemSet(EventArgs e) {
     
    4845    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4946      ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
    50       ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
     47      ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) && !activeView.Locked;
    5148    }
    5249
    5350    public override void Execute() {
    5451      ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
    55       if ((activeView != null) && (!activeView.Locked)) {
     52      if ((activeView != null) && (activeView.Content != null) && !activeView.Locked) {
    5653        Clipboard<IItem> clipboard = ((OptimizerMainForm)MainFormManager.MainForm).Clipboard;
    5754        clipboard.AddItem((IItem)activeView.Content.Clone());
Note: See TracChangeset for help on using the changeset viewer.