From 9757fee99c3ae7e500dbf9ebff641a6fd0ea7143 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 7 Jun 2005 11:45:06 +0000 Subject: [PATCH] Returns the right color is the element is artificial or radioactive. ingwa: does this fix the bug now? svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=423074 --- kalzium/src/element.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index d36d7ec..ec892fe 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -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; } -- 2.47.3