diff --git a/src/Mod/PartDesign/App/DatumPlane.cpp b/src/Mod/PartDesign/App/DatumPlane.cpp index 0968ac1736..8e065ba834 100644 --- a/src/Mod/PartDesign/App/DatumPlane.cpp +++ b/src/Mod/PartDesign/App/DatumPlane.cpp @@ -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) { diff --git a/src/Mod/PartDesign/App/DatumPlane.h b/src/Mod/PartDesign/App/DatumPlane.h index d5781ea862..34ae349c29 100644 --- a/src/Mod/PartDesign/App/DatumPlane.h +++ b/src/Mod/PartDesign/App/DatumPlane.h @@ -50,6 +50,9 @@ public: Base::Vector3d getNormal(); +protected: + virtual void Restore(Base::XMLReader& reader); + private: static const char* ResizeModeEnums[]; };