Materials: Change display of Quantity values
The default display type of quantity objects is fixed point resulting in insufficient accuracy when changing unit systems, or when the values are small. This fix changes the default format from 'Fixed' to the more apt 'Default' format. This allows the displayed values to scale as appropriate. Fixes #18149
This commit is contained in:
committed by
Chris Hennes
parent
2942cfffbc
commit
ddf48e0daa
@@ -37,6 +37,7 @@
|
||||
#include <src/App/InitApplication.h>
|
||||
|
||||
#include <Mod/Material/App/MaterialManager.h>
|
||||
#include <Mod/Material/App/MaterialValue.h>
|
||||
#include <Mod/Material/App/Model.h>
|
||||
#include <Mod/Material/App/ModelManager.h>
|
||||
#include <Mod/Material/App/ModelUuids.h>
|
||||
@@ -223,7 +224,9 @@ TEST_F(TestMaterial, TestAddAppearanceModel)
|
||||
QString parseQuantity(const char *string)
|
||||
{
|
||||
QString value = QString::fromStdString(string);
|
||||
return Base::Quantity::parse(value).getUserString();
|
||||
auto quantity = Base::Quantity::parse(value);
|
||||
quantity.setFormat(Materials::MaterialValue::getQuantityFormat());
|
||||
return quantity.getUserString();
|
||||
}
|
||||
|
||||
TEST_F(TestMaterial, TestCalculiXSteel)
|
||||
|
||||
Reference in New Issue
Block a user