PD: [skip ci] fixes #0004540: When manual size of DatumPlane is selected its Length property is not saved to the file and consequently not restored on opening

This commit is contained in:
wmayer
2021-02-20 13:33:54 +01:00
parent e5e07445dc
commit 13ed4bc6e8
2 changed files with 12 additions and 0 deletions

View File

@@ -78,6 +78,15 @@ Base::Vector3d Plane::getNormal()
return normal;
}
void Plane::Restore(Base::XMLReader& reader)
{
// set it to Manual to avoid to automatically adjust
// Length because it will be read before ResizeMode
// See bug #0004540
ResizeMode.setValue("Manual");
Datum::Restore(reader);
}
void Plane::onChanged(const App::Property *prop)
{
if (prop == &ResizeMode) {

View File

@@ -50,6 +50,9 @@ public:
Base::Vector3d getNormal();
protected:
virtual void Restore(Base::XMLReader& reader);
private:
static const char* ResizeModeEnums[];
};