]> Git trees. - libqmvoc.git/commitdiff
Returns the right color is the element is artificial or radioactive.
authorPino Toscano <pino@kde.org>
Tue, 7 Jun 2005 11:45:06 +0000 (11:45 +0000)
committerPino Toscano <pino@kde.org>
Tue, 7 Jun 2005 11:45:06 +0000 (11:45 +0000)
ingwa: does this fix the bug now?

svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=423074

kalzium/src/element.cpp

index d36d7eca5db765f24a11b55dc32f442124c32df4..ec892fe65ee0aab094a9edc30d66fb256d9e8428 100644 (file)
@@ -365,6 +365,7 @@ QColor Element::currentColor( double temp )
        { //check if the element is radioactive or artificial
                if ( _az == 3 ) color=Prefs::color_radioactive();
                if ( _az == 4 ) color=Prefs::color_artificial();
+               return color;
        }
 
        const double iButton_melting = melting();
@@ -374,15 +375,18 @@ QColor Element::currentColor( double temp )
        { //the element is solid
                color= Prefs::color_solid();
        }
-       if ( temp > iButton_melting &&
+       else if ( temp > iButton_melting &&
                        temp < iButton_boiling )
        { //the element is liquid
                color= Prefs::color_liquid();
        }
-       if ( temp > iButton_boiling )
+       else if ( temp > iButton_boiling )
        { //the element is vaporous
                color= Prefs::color_vapor();
        }
+       else
+               color = Qt::lightGray;
+
 
        return color;
 }