- Timestamp:
- 10/29/12 14:30:35 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableConditionView.cs
r8103 r8853 124 124 RegisterVariableNamesViewContentEvents(); 125 125 } else { 126 var existingEntries = variableNamesView.Content.ToList();127 128 126 // temporarily deregister to prevent circular calling of events 129 127 DeregisterVariableNamesViewContentEvents(); 130 // add additional entries 131 foreach (var variableName in Content.VariableNames.Except(existingEntries.Select(x => x.Value))) 132 variableNamesView.Content.Add(new StringValue(variableName), true); 133 foreach (var oldEntry in existingEntries.Where(x => !Content.VariableNames.Contains(x.Value))) 134 variableNamesView.Content.Remove(oldEntry); 128 variableNamesView.Content.Clear(); 129 foreach (var variableName in Content.AllVariableNames) { 130 variableNamesView.Content.Add(new StringValue(variableName), Content.VariableNames.Contains(variableName)); 131 } 135 132 RegisterVariableNamesViewContentEvents(); 136 133 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
r8476 r8853 181 181 RegisterVariableNamesViewContentEvents(); 182 182 } else { 183 var existingEntries = variableNamesView.Content.ToList();184 185 183 // temporarily deregister to prevent circular calling of events 186 184 DeregisterVariableNamesViewContentEvents(); 187 // add additional entries 188 foreach (var variableName in Content.VariableNames.Except(existingEntries.Select(x => x.Value))) 189 variableNamesView.Content.Add(new StringValue(variableName), true); 190 foreach (var oldEntry in existingEntries.Where(x => !Content.VariableNames.Contains(x.Value))) 191 variableNamesView.Content.Remove(oldEntry); 185 variableNamesView.Content.Clear(); 186 foreach (var variableName in Content.AllVariableNames) { 187 variableNamesView.Content.Add(new StringValue(variableName), Content.VariableNames.Contains(variableName)); 188 } 192 189 RegisterVariableNamesViewContentEvents(); 193 190
Note: See TracChangeset
for help on using the changeset viewer.