Commit 242b7b73 authored by Karl Ove Hufthammer's avatar Karl Ove Hufthammer
Browse files

Give correct information about the year of discovery

Because the wrong variable was used for the year of discovery,
Kalzium claimed that *all* elements were known to ancient cultures.

BUG: 413180
parent 224dcc72
...@@ -127,10 +127,9 @@ QString KalziumUtils::prettyUnit(const Element* el, ChemicalDataObject::BlueObel ...@@ -127,10 +127,9 @@ QString KalziumUtils::prettyUnit(const Element* el, ChemicalDataObject::BlueObel
} }
case ChemicalDataObject::date: // a date case ChemicalDataObject::date: // a date
{ {
//val = el->dataAsVariant(kind).toInt();
int v_int = el->dataAsVariant(kind).toInt(); int v_int = el->dataAsVariant(kind).toInt();
if (val > 1600) { if (v_int > 1600) {
result = i18n("This element was discovered in the year <numid>%1</numid>.", val); result = i18n("This element was discovered in the year <numid>%1</numid>.", v_int);
} else if (v_int == -1) { } else if (v_int == -1) {
result = i18n("The element has not yet been officially recognized by the IUPAC."); result = i18n("The element has not yet been officially recognized by the IUPAC.");
} else { // this should now really be 0. If not there is a bug in the database } else { // this should now really be 0. If not there is a bug in the database
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment