0002642: Can't open saved file (undiscovered bug/s from PDN?)

This commit is contained in:
wmayer
2017-09-24 23:51:09 +02:00
parent 46c0266591
commit 276781fb07
2 changed files with 17 additions and 0 deletions

View File

@@ -104,6 +104,20 @@ void BodyBase::onChanged (const App::Property* prop) {
Part::Feature::onChanged ( prop );
}
void BodyBase::handleChangedPropertyName(Base::XMLReader &reader,
const char * TypeName,
const char *PropName)
{
// The App::PropertyLinkList property was Model in the past (#0002642)
Base::Type type = Base::Type::fromName(TypeName);
if (Group.getClassTypeId() == type && strcmp(PropName, "Model") == 0) {
Group.Restore(reader);
}
else {
Part::Feature::handleChangedPropertyName(reader, TypeName, PropName);
}
}
PyObject* BodyBase::getPyObject()
{
if (PythonObject.is(Py::_None())){

View File

@@ -85,6 +85,9 @@ protected:
virtual void onBeforeChange (const App::Property* prop);
/// If BaseFeature is set and Tip is null set the Tip to it
virtual void onChanged (const App::Property* prop);
virtual void handleChangedPropertyName(Base::XMLReader &reader,
const char * TypeName,
const char *PropName);
};