[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/kalzium/src
From: Kashyap Ramesh Puranik <kashthealien () gmail ! com>
Date: 2009-03-20 18:58:36
Message-ID: 1237575516.323177.18715.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 941944 by kashyappuranik:
BUG: This will fix a bug that plots unknown values that does not belong to a particular set eg.metals.
M +22 -21 elementdataviewer.cpp
--- trunk/KDE/kdeedu/kalzium/src/elementdataviewer.cpp #941943:941944
@@ -440,10 +440,10 @@
belongs = 1;
}
}
- if (known)
+ if ( belongs )
{
- if ( belongs )
+ if ( known )
{
av_x += value_x;
av_y += value_y;
@@ -469,28 +469,29 @@
dataPointGreen->addPoint( value_x, value_y, lbl );
}
- else//The element does not belong to the set
- {
+ else//unknown value
+ {
+ //num is required while finding the average, if an element is not
+ //known it should not contribute to the average.
+ num--;
+
+ QString lbl;
+ if ( whatShow > 0 )//The users wants to see the labels
+ {
+ lbl = whatShow == 1 ? names[i-1] : symbols[i-1];
+ }
+
+ dataPointRed->addPoint( value_x, value_y, lbl );
+ //For an Unknown value, use a red point to mark the data-point.
+ }
+ }
+
+ else//The element does not belong to the set
+ {
//num is required while finding average, if an element is
//not in the selected set, it should not contribute to the avg.
num--;
- }
- }
- else//unknown value
- {
- //num is required while finding the average, if an element is not
- //known it should not contribute to the average.
- num--;
-
- QString lbl;
- if ( whatShow > 0 )//The users wants to see the labels
- {
- lbl = whatShow == 1 ? names[i-1] : symbols[i-1];
- }
-
- dataPointRed->addPoint( value_x, value_y, lbl );
- //For an Unknown value, use a red point to mark the data-point.
- }
+ }
}
ui.plotwidget->addPlotObject( dataPointGreen );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic