GUI/MainForm.cs
changeset 395 d1f25b504845
parent 387 87093432c843
child 400 f4e2e3e69651
     1.1 --- a/GUI/MainForm.cs	Sat Jun 08 17:15:09 2013 +0000
     1.2 +++ b/GUI/MainForm.cs	Sun Jun 09 16:08:59 2013 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4    License, v. 2.0. If a copy of the MPL was not distributed with this
     1.5    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.6   
     1.7 -  Copyright (C) 2009-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.8 +  Copyright (C) 2009-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.9  	Copyright (C) 2010 Paul Werelds <paul@werelds.net>
    1.10  	Copyright (C) 2012 Prince Samuel <prince.samuel@gmail.com>
    1.11  
    1.12 @@ -459,8 +459,7 @@
    1.13        int colorIndex = 0;
    1.14        foreach (TreeNodeAdv node in treeView.AllNodes) {
    1.15          SensorNode sensorNode = node.Tag as SensorNode;
    1.16 -        if (sensorNode != null &&
    1.17 -          sensorNode.Sensor.SensorType == SensorType.Temperature) {
    1.18 +        if (sensorNode != null) {
    1.19            if (sensorNode.Plot) {
    1.20              colors.Add(sensorNode.Sensor,
    1.21                plotColorPalette[colorIndex % plotColorPalette.Length]);
    1.22 @@ -484,9 +483,7 @@
    1.23      private void nodeCheckBox_IsVisibleValueNeeded(object sender, 
    1.24        NodeControlValueEventArgs e) {
    1.25        SensorNode node = e.Node.Tag as SensorNode;
    1.26 -      e.Value = (node != null) && 
    1.27 -        (node.Sensor.SensorType == SensorType.Temperature) && 
    1.28 -        plotMenuItem.Checked;
    1.29 +      e.Value = (node != null) && plotMenuItem.Checked;
    1.30      }
    1.31  
    1.32      private void exitClick(object sender, EventArgs e) {
    1.33 @@ -496,7 +493,7 @@
    1.34      private void timer_Tick(object sender, EventArgs e) {
    1.35        computer.Accept(updateVisitor);
    1.36        treeView.Invalidate();
    1.37 -      plotPanel.Invalidate();
    1.38 +      plotPanel.InvalidatePlot();
    1.39        systemTray.Redraw();
    1.40        if (gadget != null)
    1.41          gadget.Redraw();
    1.42 @@ -506,6 +503,7 @@
    1.43      }
    1.44  
    1.45      private void SaveConfiguration() {
    1.46 +      plotPanel.SetCurrentSettings();
    1.47        foreach (TreeColumn column in treeView.Columns)
    1.48          settings.SetValue("treeView.Columns." + column.Header + ".Width",
    1.49            column.Width);