Assembly: BOM, use getUserString to simplify code

This commit is contained in:
Furgo
2025-04-22 18:03:27 +02:00
parent 59ea0d6e84
commit cfe797e8f8

View File

@@ -277,9 +277,7 @@ std::string BomObject::getBomPropertyValue(App::DocumentObject* obj, const std::
return propStr->getValue();
}
else if (auto propQuantity = freecad_cast<App::PropertyQuantity*>(prop)) {
auto unit = propQuantity->getUnit().getString();
auto value = std::to_string(propQuantity->getValue());
return value + " " + unit;
return propQuantity->getQuantityValue().getUserString();
}
else if (auto propFloat = freecad_cast<App::PropertyFloat*>(prop)) {
return std::to_string(propFloat->getValue());