Skip to content

Commit

Permalink
Base: Handle Unit::Stress tha same way as Unit::Pressure in UnitsSchema
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF committed May 18, 2015
1 parent 4729caf commit b7e7f1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Base/UnitsSchemaInternal.cpp
Expand Up @@ -80,7 +80,7 @@ QString UnitsSchemaInternal::schemaTranslate(Base::Quantity quant,double &factor
// default action for all cases without special treatment:
unitString = quant.getUnit().getString();
factor = 1.0;
}else if (unit == Unit::Pressure){
}else if ((unit == Unit::Pressure) || (unit == Unit::Stress)){
if(UnitValue < 10.0){// Pa is the smallest
unitString = QString::fromLatin1("Pa");
factor = 0.001;
Expand Down
2 changes: 1 addition & 1 deletion src/Base/UnitsSchemaMKS.cpp
Expand Up @@ -91,7 +91,7 @@ QString UnitsSchemaMKS::schemaTranslate(Base::Quantity quant,double &factor,QStr
unitString = QString::fromLatin1("km^3");
factor = 1000000000000000000.0;
}
}else if (unit == Unit::Pressure){
}else if ((unit == Unit::Pressure) || (unit == Unit::Stress)){
if(UnitValue < 10.0){// Pa is the smallest
unitString = QString::fromLatin1("Pa");
factor = 0.001;
Expand Down

0 comments on commit b7e7f1f

Please sign in to comment.