Base: Quantity: return std::string

This commit is contained in:
Ladislav Michl
2024-07-13 13:07:27 +02:00
committed by Yorik van Havre
parent 9f7218ac75
commit 0b3adee2ab
58 changed files with 573 additions and 592 deletions

View File

@@ -1621,10 +1621,10 @@ void PropertyString::setPathValue(const ObjectIdentifier& path, const boost::any
setValue(std::to_string(App::any_cast<float>(value)));
}
else if (value.type() == typeid(Quantity)) {
setValue(boost::any_cast<Quantity>(value).getUserString().toUtf8().constData());
setValue(boost::any_cast<Quantity>(value).getUserString().c_str());
}
else if (value.type() == typeid(std::string)) {
setValue(boost::any_cast<const std::string&>(value));
setValue(boost::any_cast<const std::string &>(value));
}
else {
Base::PyGILStateLocker lock;