Ignore:
Timestamp:
07/22/19 14:15:55 (5 months ago)
Author:
abeham
Message:

#3005: merged to stable (16872, 16873, 16875, 16890)

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs

    r17097 r17149  
    6262    protected override void DeregisterContentEvents() {
    6363      Content.GetsCollectedChanged -= new EventHandler(Content_GetsCollectedChanged);
     64      Content.ReadOnlyChanged -= new EventHandler(Content_ReadOnlyChanged);
    6465      Content.ValidValues.ItemsAdded -= new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsAdded);
    6566      Content.ValidValues.ItemsRemoved -= new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved);
     
    7677      base.RegisterContentEvents();
    7778      Content.GetsCollectedChanged += new EventHandler(Content_GetsCollectedChanged);
     79      Content.ReadOnlyChanged += new EventHandler(Content_ReadOnlyChanged);
    7880      Content.ValidValues.ItemsAdded += new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsAdded);
    7981      Content.ValidValues.ItemsRemoved += new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved);
     
    100102      base.SetEnabledStateOfControls();
    101103      valueGroupBox.Enabled = Content != null;
    102       valueComboBox.Enabled = (valueComboBox.Items.Count > 0) && !ReadOnly;
     104      valueComboBox.Enabled = Content != null && valueComboBox.Items.Count > 0 && !Content.ReadOnly && !ReadOnly;
    103105      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    104106    }
     
    153155        FillValueComboBox();
    154156    }
     157    protected virtual void Content_ReadOnlyChanged(object sender, EventArgs e) {
     158      if (InvokeRequired)
     159        Invoke(new EventHandler(Content_ReadOnlyChanged), sender, e);
     160      else {
     161        SetEnabledStateOfControls();
     162      }
     163    }
    155164    protected virtual void Content_GetsCollectedChanged(object sender, EventArgs e) {
    156165      if (InvokeRequired)
Note: See TracChangeset for help on using the changeset viewer.