Changeset 5842


Ignore:
Timestamp:
03/28/11 17:21:40 (11 years ago)
Author:
gkronber
Message:

#1451 added missing check for InvokeRequired in ResultsCollectionView

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs

    r5831 r5842  
    5757
    5858    protected override void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
    59       AdjustListViewColumnSizes();
    60       if (showDetailsCheckBox.Checked) {
    61         if (itemsListView.SelectedItems.Count == 1) {
    62           IResult result = (IResult)itemsListView.SelectedItems[0].Tag;
    63           detailsGroupBox.Enabled = true;
    64           viewHost.Content = result.Value;
    65         } else {
    66           viewHost.Content = null;
    67           detailsGroupBox.Enabled = false;
     59      if (InvokeRequired) {
     60        Invoke((Action<object, EventArgs>)itemsListView_SelectedIndexChanged, sender, e);
     61      } else {
     62        AdjustListViewColumnSizes();
     63        if (showDetailsCheckBox.Checked) {
     64          if (itemsListView.SelectedItems.Count == 1) {
     65            IResult result = (IResult)itemsListView.SelectedItems[0].Tag;
     66            detailsGroupBox.Enabled = true;
     67            viewHost.Content = result.Value;
     68          } else {
     69            viewHost.Content = null;
     70            detailsGroupBox.Enabled = false;
     71          }
    6872        }
    6973      }
Note: See TracChangeset for help on using the changeset viewer.