Changeset 5835 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs
- Timestamp:
- 03/28/11 13:34:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs
r5829 r5835 43 43 IEnumerable<ISymbolicExpressionTreeStringFormatter> formatters = ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeStringFormatter>(); 44 44 treeFormattersList = new List<ISymbolicExpressionTreeStringFormatter>(); 45 int selectedIndex = -1;46 45 foreach (ISymbolicExpressionTreeStringFormatter formatter in formatters) { 47 if (formatter is ISymbolicExpressionTreeStringFormatter)48 selectedIndex = treeFormattersList.Count;49 46 treeFormattersList.Add(formatter); 50 47 formattersComboBox.Items.Add(formatter.Name); 51 48 } 52 formattersComboBox.SelectedIndex = selectedIndex; 49 if (formattersComboBox.Items.Count > 0) 50 formattersComboBox.SelectedIndex = 0; 51 else 52 formattersComboBox.SelectedIndex = -1; 53 53 } 54 54
Note: See TracChangeset
for help on using the changeset viewer.