]> Git trees. - libqmvoc.git/commitdiff
Restore Mass and Density in the detailed view.
authorPino Toscano <pino@kde.org>
Mon, 30 May 2005 20:34:01 +0000 (20:34 +0000)
committerPino Toscano <pino@kde.org>
Mon, 30 May 2005 20:34:01 +0000 (20:34 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=419902

kalzium/src/element.cpp

index 6c099e65a0314fc549c25dd8e27b25f3fb06591c..3800ea8e6cf8ec9981fc945fb612c1dec3f09c55 100644 (file)
@@ -141,19 +141,19 @@ const QString Element::adjustUnits( const int type )
        else if ( type == EN ) //Electronegativity
        {
                val = electroneg();
-               if ( val == -1 )
+               if ( val <= 0 )
                        v = i18n( "Value not defined" );
                else
                        v = QString::number( val );
        }
-       else if ( type == RADIUS || IONICRADIUS ) // its a length
+       else if ( type == RADIUS || type == IONICRADIUS ) // its a length
        {
                if ( type == RADIUS )
                        val = radius();
                else if ( type == IONICRADIUS )
                        val = ionicValue();
 
-               if ( val == -1 )
+               if ( val <= 0 )
                        v = i18n( "Value unknown" );
                else
                {
@@ -175,7 +175,7 @@ const QString Element::adjustUnits( const int type )
        else if ( type == MASS ) // its a mass
        {
                val = mass();
-               if ( val == -1 )
+               if ( val <= 0 )
                        v = i18n( "Value unknown" );
                else
                {
@@ -195,7 +195,7 @@ const QString Element::adjustUnits( const int type )
        {
                val = density();
 
-               if ( val == -1 )
+               if ( val <= 0 )
                        v = i18n( "Value unknown" );
                else
                {