Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/10 18:12:52 (14 years ago)
Author:
mkommend
Message:

corrected collection views and ViewHost (ticket #972)

File:
1 edited

Legend:

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

    r3694 r3709  
    9898      while (itemsListView.Items.Count > 0) RemoveListViewItem(itemsListView.Items[0]);
    9999      viewHost.Content = null;
    100       runCollectionConstraintCollectionView.Content = null;
    101       tabControl.TabPages.Remove(constraintPage);
    102100
    103101      if (Content != null) {
    104102        if (RunCollection != null) {
    105           tabControl.TabPages.Add(constraintPage);
     103          if (!tabControl.TabPages.Contains(constraintPage))
     104            tabControl.TabPages.Add(constraintPage);
    106105          runCollectionConstraintCollectionView.Content = RunCollection.Constraints;
    107106          runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
     
    112111          UpdateRun(item);
    113112        }
     113      } else {
     114        runCollectionConstraintCollectionView.Content = null;
     115        if (tabControl.TabPages.Contains(constraintPage))
     116          tabControl.TabPages.Remove(constraintPage);
    114117      }
    115118      SetEnabledStateOfControls();
     
    183186        IRun item = (IRun)itemsListView.SelectedItems[0].Tag;
    184187        detailsGroupBox.Enabled = true;
    185         viewHost.ViewType = null;
    186188        viewHost.Content = item;
    187189      } else {
Note: See TracChangeset for help on using the changeset viewer.