Fix rendering of Unit::ThermalConductivity
The old behaviour was:
>>> Quantity('0.9 W/m/K').UserString
u'0.00 W/mm/K'
>>> Quantity('1.1 W/m/K').UserString
u'1.10 W/m/K'
>>> Quantity('1100 W/m/K').UserString
u'1100.00 W/m/K'
The new behaviour is:
>>> Quantity('0.9 W/m/K').UserString
u'0.90 W/m/K'
>>> Quantity('1.1 W/m/K').UserString
u'1.10 W/m/K'
>>> Quantity('1100 W/m/K').UserString
u'1.10 W/mm/K'
This commit is contained in:
@@ -114,7 +114,7 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
|
||||
}
|
||||
}
|
||||
else if (unit == Unit::ThermalConductivity) {
|
||||
if (UnitValue < 1000) {
|
||||
if (UnitValue > 1000000) {
|
||||
unitString = QString::fromLatin1("W/mm/K");
|
||||
factor = 1000000.0;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ QString UnitsSchemaMKS::schemaTranslate(const Quantity &quant, double &factor, Q
|
||||
}
|
||||
}
|
||||
else if (unit == Unit::ThermalConductivity) {
|
||||
if (UnitValue < 1000) {
|
||||
if (UnitValue > 1000000) {
|
||||
unitString = QString::fromLatin1("W/mm/K");
|
||||
factor = 1000000.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user