Index: /trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.Designer.cs	(revision 1388)
+++ /trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.Designer.cs	(revision 1389)
@@ -26,5 +26,4 @@
       this.OptionsDialogCancelButton = new System.Windows.Forms.Button();
       this.OptionsDialogOkButton = new System.Windows.Forms.Button();
-      this.OptionsDialogApplyBtn = new System.Windows.Forms.Button();
       this.fdFont = new System.Windows.Forms.FontDialog();
       this.tpTitle = new System.Windows.Forms.TabPage();
@@ -65,11 +64,11 @@
       this.OptionsDialogCancelButton.Size = new System.Drawing.Size(75, 23);
       this.OptionsDialogCancelButton.TabIndex = 1;
-      this.OptionsDialogCancelButton.Text = "Cancel";
+      this.OptionsDialogCancelButton.Text = "Reset";
       this.OptionsDialogCancelButton.UseVisualStyleBackColor = true;
-      this.OptionsDialogCancelButton.Click += new System.EventHandler(this.OptionsDialogCancelButton_Click);
+      this.OptionsDialogCancelButton.Click += new System.EventHandler(this.OptionsDialogResetButton_Click);
       // 
       // OptionsDialogOkButton
       // 
-      this.OptionsDialogOkButton.Location = new System.Drawing.Point(43, 232);
+      this.OptionsDialogOkButton.Location = new System.Drawing.Point(132, 232);
       this.OptionsDialogOkButton.Name = "OptionsDialogOkButton";
       this.OptionsDialogOkButton.Size = new System.Drawing.Size(75, 23);
@@ -78,14 +77,4 @@
       this.OptionsDialogOkButton.UseVisualStyleBackColor = true;
       this.OptionsDialogOkButton.Click += new System.EventHandler(this.OptionsDialogOkButton_Click);
-      // 
-      // OptionsDialogApplyBtn
-      // 
-      this.OptionsDialogApplyBtn.Location = new System.Drawing.Point(128, 231);
-      this.OptionsDialogApplyBtn.Name = "OptionsDialogApplyBtn";
-      this.OptionsDialogApplyBtn.Size = new System.Drawing.Size(75, 23);
-      this.OptionsDialogApplyBtn.TabIndex = 3;
-      this.OptionsDialogApplyBtn.Text = "Apply";
-      this.OptionsDialogApplyBtn.UseVisualStyleBackColor = true;
-      this.OptionsDialogApplyBtn.Click += new System.EventHandler(this.OptionsDialogApplyBtn_Click);
       // 
       // fdFont
@@ -207,4 +196,5 @@
       this.LinestyleCB.Size = new System.Drawing.Size(121, 21);
       this.LinestyleCB.TabIndex = 2;
+      this.LinestyleCB.SelectedIndexChanged += new System.EventHandler(this.LinestyleCB_SelectedIndexChanged);
       // 
       // label1
@@ -256,4 +246,5 @@
       this.LineThicknessCB.Size = new System.Drawing.Size(121, 21);
       this.LineThicknessCB.TabIndex = 4;
+      this.LineThicknessCB.SelectedIndexChanged += new System.EventHandler(this.LineThicknessCB_SelectedIndexChanged);
       // 
       // label3
@@ -324,5 +315,4 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.ClientSize = new System.Drawing.Size(292, 266);
-      this.Controls.Add(this.OptionsDialogApplyBtn);
       this.Controls.Add(this.OptionsDialogOkButton);
       this.Controls.Add(this.OptionsDialogCancelButton);
@@ -351,5 +341,4 @@
     private System.Windows.Forms.Button OptionsDialogCancelButton;
     private System.Windows.Forms.Button OptionsDialogOkButton;
-    private System.Windows.Forms.Button OptionsDialogApplyBtn;
     private System.Windows.Forms.FontDialog fdFont;
     private System.Windows.Forms.TabPage tpTitle;
Index: /trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs	(revision 1388)
+++ /trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs	(revision 1389)
@@ -1,4 +1,5 @@
 ﻿using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Windows.Forms;
 using HeuristicLab.Visualization.Legend;
@@ -8,4 +9,30 @@
     private readonly IChartDataRowsModel model;
     private readonly ViewSettings viewSettings;
+    private readonly ViewSettings oldViewSettings;
+    private LineParams[] oldLineParams;
+    private Dictionary<CheckBox,bool> ShowYAxisBoxes;
+
+    internal class LineParams {
+      string Label { get; set; }
+      Color Color { get; set; }
+      int Thickness { get; set; }
+      DrawingStyle Style { get; set; }
+      private readonly IDataRow row;
+
+      public LineParams(IDataRow row) {
+        Label = row.Label;
+        Color = row.Color;
+        Thickness = row.Thickness;
+        Style = row.Style;
+        this.row = row;
+      }
+
+      public void applySettings() {
+        row.Label = Label;
+        row.Color = Color;
+        row.Thickness = Thickness;
+        row.Style = Style;
+      }
+    }
 
     public OptionsDialog(IChartDataRowsModel model) {
@@ -14,4 +41,5 @@
       this.model = model;
       viewSettings = model.ViewSettings;
+      oldViewSettings = new ViewSettings(model.ViewSettings);
 
       cbLegendPosition.Items.Add(LegendPosition.Top);
@@ -27,8 +55,9 @@
       dlg.ShowDialog();
       ColorPreviewTB.BackColor = dlg.Color;
+      ((IDataRow)LineSelectCB.SelectedValue).Color = dlg.Color;
     }
 
     public IList<int> GetThicknesses() {
-      return new List<int>(new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8});
+      return new List<int>(new int[] {1, 2, 3, 4, 5, 6, 7, 8});
     }
 
@@ -38,18 +67,32 @@
 
     private void OptionsDialog_Load(object sender, EventArgs e) {
+      InitTabPageLines();
+      InitTabPageYAxes();
+    }
+
+    private void InitTabPageLines() {
       if (model.Rows.Count != 0) {
+        int index = 0;
+        oldLineParams = new LineParams[model.Rows.Count];
+        foreach (var row in model.Rows) {
+          oldLineParams[index++]= new LineParams(row);
+        }
+        LineThicknessCB.DataSource = GetThicknesses();
+        LinestyleCB.DataSource = GetStyles();
+        LinestyleCB.SelectedItem = model.Rows[0].Style;
+        LineThicknessCB.SelectedItem = model.Rows[0].Thickness;
+
         LineSelectCB.DataSource = model.Rows;
         LineSelectCB.DisplayMember = "Label";
 
-        LineThicknessCB.DataSource = GetThicknesses();
-        LinestyleCB.DataSource = GetStyles();
+        
         LineSelectCB.SelectedIndex = 0;
         LineSelectCB_SelectedIndexChanged(this, null);
-      }
-
-      InitTabPageYAxes();
+        
+      }
     }
 
     private void InitTabPageYAxes() {
+      ShowYAxisBoxes = new Dictionary<CheckBox, bool>();
       for (int i = 0; i < model.YAxes.Count; i++) {
         YAxisDescriptor yAxisDescriptor = model.YAxes[i];
@@ -58,4 +101,5 @@
         chkbox.Text = yAxisDescriptor.Label;
         chkbox.Checked = yAxisDescriptor.ShowYAxis;
+        ShowYAxisBoxes[chkbox] = yAxisDescriptor.ShowYAxis;
         chkbox.CheckedChanged += delegate { yAxisDescriptor.ShowYAxis = chkbox.Checked; };
         
@@ -66,38 +110,26 @@
     private void LineSelectCB_SelectedIndexChanged(object sender, EventArgs e) {
       if (LineSelectCB.SelectedValue != null) {
-        int index =
+      /*  int index =
           LineThicknessCB.FindStringExact(((IDataRow)LineSelectCB.SelectedValue).Thickness.ToString());
         LineThicknessCB.SelectedIndex = index;
         index = LinestyleCB.FindStringExact(((IDataRow)LineSelectCB.SelectedValue).Style.ToString());
-        LinestyleCB.SelectedIndex = index;
-        ColorPreviewTB.BackColor = ((IDataRow)LineSelectCB.SelectedValue).Color;
-      }
-    }
-
-    private void OptionsDialogCancelButton_Click(object sender, EventArgs e) {
+        LinestyleCB.SelectedIndex = index;  */
+        LineThicknessCB.SelectedItem = ((IDataRow) LineSelectCB.SelectedValue).Thickness;
+        LinestyleCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).Style;
+        ColorPreviewTB.BackColor = ((IDataRow)LineSelectCB.SelectedValue).Color;   
+      }
+    }
+
+    
+    private void OptionsDialogOkButton_Click(object sender, EventArgs e) {
       Close();
     }
-
-    private void OptionsDialogOkButton_Click(object sender, EventArgs e) {
-      ApplyChanges();
-
-      Close();
-    }
-
-    private void OptionsDialogApplyBtn_Click(object sender, EventArgs e) {
-      ApplyChanges();  
-    }
-
-    private void ApplyChanges() {
-      if (LineSelectCB.SelectedValue != null) {
-        ((IDataRow)LineSelectCB.SelectedValue).Thickness = (int)LineThicknessCB.SelectedItem;
-        ((IDataRow)LineSelectCB.SelectedValue).Color = ColorPreviewTB.BackColor;
-        ((IDataRow)LineSelectCB.SelectedValue).Style = (DrawingStyle)LinestyleCB.SelectedItem;
-      }
-      viewSettings.UpdateView();
-    }
+    
+
+   
 
     private void cbLegendPosition_SelectedIndexChanged(object sender, EventArgs e) {
       viewSettings.LegendPosition = (LegendPosition)cbLegendPosition.SelectedItem;
+      viewSettings.UpdateView();
     }
 
@@ -143,4 +175,38 @@
       }
     }
+
+    private void OptionsDialogResetButton_Click(object sender, EventArgs e) {
+      foreach (var param in oldLineParams) {
+        param.applySettings();
+      }
+
+      foreach (var box in ShowYAxisBoxes) {
+        box.Key.Checked = box.Value;
+      }
+      viewSettings.LegendColor = oldViewSettings.LegendColor;
+      viewSettings.LegendPosition = oldViewSettings.LegendPosition;
+      viewSettings.LegendFont = oldViewSettings.LegendFont;
+      viewSettings.TitleColor = oldViewSettings.TitleColor;
+      viewSettings.TitleFont = oldViewSettings.TitleFont;
+      viewSettings.XAxisColor = oldViewSettings.LegendColor;
+      viewSettings.XAxisFont = oldViewSettings.XAxisFont;
+      viewSettings.UpdateView();
+      cbLegendPosition.SelectedItem = viewSettings.LegendPosition;
+      this.LineSelectCB_SelectedIndexChanged(this,null);
+    }
+
+    private void LinestyleCB_SelectedIndexChanged(object sender, EventArgs e) {
+      if (LineSelectCB.SelectedValue != null)
+        ((IDataRow)LineSelectCB.SelectedValue).Style = (DrawingStyle)LinestyleCB.SelectedItem;
+    }
+
+    private void LineThicknessCB_SelectedIndexChanged(object sender, EventArgs e) {
+      if (LineSelectCB.SelectedValue != null)
+        ((IDataRow)LineSelectCB.SelectedValue).Thickness = (int)LineThicknessCB.SelectedItem;
+    }
+
+
+
+
   }
 }
Index: /trunk/sources/HeuristicLab.Visualization/Options/ViewSettings.cs
===================================================================
--- /trunk/sources/HeuristicLab.Visualization/Options/ViewSettings.cs	(revision 1388)
+++ /trunk/sources/HeuristicLab.Visualization/Options/ViewSettings.cs	(revision 1389)
@@ -25,4 +25,18 @@
 
       legendPosition = LegendPosition.Bottom;
+    }
+
+    public ViewSettings(ViewSettings src) {
+      
+      titleFont = (Font)(src.titleFont.Clone());
+      titleColor = src.TitleColor;
+
+      legendFont = (Font)(src.legendFont.Clone());
+      legendColor = src.LegendColor;
+
+      xAxisFont = (Font) (src.xAxisFont.Clone());
+      xAxisColor = src.XAxisColor;
+
+      legendPosition = src.LegendPosition;
     }
 
