Mod: make sure to call the base class' handleChangedPropertyType

This commit is contained in:
wmayer
2021-09-15 14:07:32 +02:00
parent 2295c4b9a3
commit fa86b0216e
14 changed files with 51 additions and 6 deletions

View File

@@ -224,7 +224,7 @@ void ViewProviderLeader::handleChangedPropertyType(Base::XMLReader &reader, cons
}
// property LineStyle had the App::PropertyInteger and was changed to App::PropertyIntegerConstraint
if (prop == &LineStyle && strcmp(TypeName, "App::PropertyInteger") == 0) {
else if (prop == &LineStyle && strcmp(TypeName, "App::PropertyInteger") == 0) {
App::PropertyInteger LineStyleProperty;
// restore the PropertyInteger to be able to set its value
LineStyleProperty.Restore(reader);
@@ -232,12 +232,16 @@ void ViewProviderLeader::handleChangedPropertyType(Base::XMLReader &reader, cons
}
// property LineStyle had the App::PropertyIntegerConstraint and was changed to App::PropertyEnumeration
if (prop == &LineStyle && strcmp(TypeName, "App::PropertyIntegerConstraint") == 0) {
else if (prop == &LineStyle && strcmp(TypeName, "App::PropertyIntegerConstraint") == 0) {
App::PropertyIntegerConstraint LineStyleProperty;
// restore the PropertyIntegerConstraint to be able to set its value
LineStyleProperty.Restore(reader);
LineStyle.setValue(LineStyleProperty.getValue());
}
else {
ViewProviderDrawingView::handleChangedPropertyType(reader, TypeName, prop);
}
}
bool ViewProviderLeader::onDelete(const std::vector<std::string> &)