Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2336


Ignore:
Timestamp:
09/07/09 12:20:05 (15 years ago)
Author:
mkommend
Message:

added InvokeRequired check in FireMainFormChanged and OnActiveViewChanged (ticket #716)

File:
1 edited

Legend:

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

    r2334 r2336  
    112112    public event EventHandler ActiveViewChanged;
    113113    protected virtual void OnActiveViewChanged() {
    114       if (ActiveViewChanged != null)
     114      if (InvokeRequired)
     115        Invoke((MethodInvoker)OnActiveViewChanged);
     116      else if (ActiveViewChanged != null)
    115117        ActiveViewChanged(this, new EventArgs());
    116118    }
     
    121123    }
    122124    protected virtual void OnMainFormChanged() {
    123       if (MainFormChanged != null)
     125      if (InvokeRequired)
     126        Invoke((MethodInvoker)FireMainFormChanged);
     127      else if (MainFormChanged != null)
    124128        MainFormChanged(this, new EventArgs());
    125129    }
Note: See TracChangeset for help on using the changeset viewer.