Base: Handle Unit::Stress tha same way as Unit::Pressure in UnitsSchema
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
parent
4729cafdcc
commit
b7e7f1f40a
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user