Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1204 for branches


Ignore:
Timestamp:
02/05/09 11:08:58 (16 years ago)
Author:
abeham
Message:

fixed bug #483 in branch 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/sources/HeuristicLab.Data/ConstrainedItemList.cs

    r347 r1204  
    114114    public bool TryInsert(int index, IItem item, out ICollection<IConstraint> violatedConstraints) {
    115115      list.Insert(index, item);
    116       if (!suspendConstraintCheck && IsValid(out violatedConstraints)) {
     116      if (suspendConstraintCheck || IsValid(out violatedConstraints)) {
    117117        OnItemAdded(item, index);
    118118        return true;
     
    127127      IItem item = list[index];
    128128      list.RemoveAt(index);
    129       if (!suspendConstraintCheck && IsValid(out violatedConstraints)) {
     129      if (suspendConstraintCheck || IsValid(out violatedConstraints)) {
    130130        OnItemRemoved(item, index);
    131131        return true;
     
    144144      IItem backup = this[index];
    145145      list[index] = item;
    146       if (!suspendConstraintCheck && IsValid(out violatedConstraints)) {
     146      if (suspendConstraintCheck || IsValid(out violatedConstraints)) {
    147147        return true;
    148148      } else {
     
    155155    public bool TryAdd(IItem item, out ICollection<IConstraint> violatedConstraints) {
    156156      list.Add(item);
    157       if (!suspendConstraintCheck && IsValid(out violatedConstraints)) {
     157      if (suspendConstraintCheck || IsValid(out violatedConstraints)) {
    158158        OnItemAdded(item, list.Count - 1);
    159159        return true;
Note: See TracChangeset for help on using the changeset viewer.