Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
This commit is contained in:
@@ -877,13 +877,8 @@ Document::Document(const char* documentName)
|
||||
"Additional tag to save the name of the company");
|
||||
ADD_PROPERTY_TYPE(UnitSystem, (""), 0, Prop_None, "Unit system to use in this project");
|
||||
// Set up the possible enum values for the unit system
|
||||
int num = static_cast<int>(Base::UnitSystem::NumUnitSystemTypes);
|
||||
std::vector<std::string> enumValsAsVector;
|
||||
for (int i = 0; i < num; i++) {
|
||||
QString item = Base::UnitsApi::getDescription(static_cast<Base::UnitSystem>(i));
|
||||
enumValsAsVector.emplace_back(item.toStdString());
|
||||
}
|
||||
UnitSystem.setEnums(enumValsAsVector);
|
||||
|
||||
UnitSystem.setEnums(Base::UnitsApi::getDescriptions());
|
||||
// Get the preferences/General unit system as the default for a new document
|
||||
ParameterGrp::handle hGrpu =
|
||||
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Units");
|
||||
|
||||
Reference in New Issue
Block a user