Changeset 10952 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/SingleScatterPlotView.cs
- Timestamp:
- 06/04/14 15:32:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/SingleScatterPlotView.cs
r10915 r10952 19 19 20 20 [View("Single Scatter Plot View")] 21 [Content(typeof(ScatterPlotContent), false)]21 [Content(typeof(ScatterPlotContent), true)] 22 22 public partial class SingleScatterPlotView : ItemView { 23 23 … … 42 42 comboBoxYVariable.Items.AddRange(variables.ToArray()); 43 43 44 if (variables.Count() >= 2) { 45 comboBoxXVariable.SelectedIndex = 0; 46 comboBoxYVariable.SelectedIndex = 1; 47 UpdateScatterPlot(); 48 44 // use x and y variable from content 45 if (Content.SelectedXVariable != null && Content.SelectedYVariable != null) { 46 comboBoxXVariable.SelectedItem = Content.SelectedXVariable; 47 comboBoxYVariable.SelectedItem = Content.SelectedYVariable; 48 } else { 49 if (variables.Count() >= 2) { 50 comboBoxXVariable.SelectedIndex = 0; 51 comboBoxYVariable.SelectedIndex = 1; 52 UpdateScatterPlot(); 53 54 } 49 55 } 50 56 … … 67 73 ScatterPlot scatterPlot = logic.CreateScatterPlot((string)comboBoxXVariable.SelectedItem, (string)comboBoxYVariable.SelectedItem); 68 74 scatterPlotView.Content = scatterPlot; 75 76 //save selected x and y variable in content 77 this.Content.SelectedXVariable = (string)comboBoxXVariable.SelectedItem; 78 this.Content.SelectedYVariable = (string)comboBoxYVariable.SelectedItem; 69 79 } 70 80 }
Note: See TracChangeset
for help on using the changeset viewer.