Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/10 20:39:00 (14 years ago)
Author:
mkommend
Message:

changed responsibility for calling OnToolStripItemSet from the MainForm to the ActionUserInterfaceItem (ticket #857)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ActionUserInterfaceItem.cs

    r2704 r2707  
    2929  public abstract class ActionUserInterfaceItem : HeuristicLab.MainForm.ActionUserInterfaceItem {
    3030    private ToolStripItem toolStripItem;
    31     public virtual ToolStripItem ToolStripItem {
     31    public ToolStripItem ToolStripItem {
    3232      get { return this.toolStripItem; }
    33       internal set { this.toolStripItem = value; }
     33      internal set {
     34        if (this.toolStripItem != value) {
     35          this.toolStripItem = value;
     36          if (this.toolStripItem == null)
     37            this.OnToolStripItemSet(new EventArgs());
     38        }
     39      }
    3440    }
    3541
     
    3844    }
    3945
    40     protected internal virtual void OnToolStripItemSet(EventArgs e) {
     46    protected virtual void OnToolStripItemSet(EventArgs e) {
    4147    }
    4248  }
Note: See TracChangeset for help on using the changeset viewer.