diff --git a/src/Mod/TechDraw/App/DrawView.cpp b/src/Mod/TechDraw/App/DrawView.cpp index 0382f91259..3f3e0d35a2 100644 --- a/src/Mod/TechDraw/App/DrawView.cpp +++ b/src/Mod/TechDraw/App/DrawView.cpp @@ -60,9 +60,9 @@ using namespace TechDraw; //=========================================================================== const char* DrawView::ScaleTypeEnums[]= {"Page", - "Automatic", - "Custom", - NULL}; + "Automatic", + "Custom", + NULL}; App::PropertyFloatConstraint::Constraints DrawView::scaleRange = {Precision::Confusion(), std::numeric_limits::max(), pow(10,- Base::UnitsApi::getDecimals())}; @@ -340,12 +340,12 @@ void DrawView::handleChangedPropertyType( Scale.setValue(1.0); } } else { - // has Scale property that isn't float - Base::Console().Log("DrawPage::Restore - old document Scale is not a float!\n"); + // has Scale prop that isn't Float! + Base::Console().Log("DrawPage::Restore - old Document Scale is Not Float!\n"); + // no idea } } else if (prop->isDerivedFrom(App::PropertyLinkList::getClassTypeId()) - && strcmp(prop->getName(),"Source")==0) - { + && strcmp(prop->getName(),"Source")==0) { App::PropertyLinkGlobal glink; App::PropertyLink link; if (strcmp(glink.getTypeId().getName(),TypeName) == 0) { //property in file is plg @@ -363,19 +363,12 @@ void DrawView::handleChangedPropertyType( static_cast(prop)->setValue(link.getValue()); } } - // property X had App::PropertyFloat and was changed to App::PropertyLength - // sb PropertyDistance. some X,Y are relative to existing point on page - } else if (prop == &X && strcmp(TypeName, "App::PropertyFloat") == 0) { - App::PropertyFloat XProperty; - XProperty.setContainer(this); - // restore the PropertyFloat to be able to set its value - XProperty.Restore(reader); - X.setValue(XProperty.getValue()); - } else if (prop == &Y && strcmp(TypeName, "App::PropertyFloat") == 0) { - App::PropertyFloat YProperty; - YProperty.setContainer(this); - YProperty.Restore(reader); - Y.setValue(YProperty.getValue()); +// property Rotation had App::PropertyFloat and was changed to App::PropertyAngle + } else if (prop == &Rotation && strcmp(TypeName, "App::PropertyFloat") == 0) { + App::PropertyFloat RotationProperty; + RotationProperty.setContainer(this); + RotationProperty.Restore(reader); + Rotation.setValue(RotationProperty.getValue()); } } diff --git a/src/Mod/TechDraw/App/DrawView.h b/src/Mod/TechDraw/App/DrawView.h index 34782a662c..84ce5b1350 100644 --- a/src/Mod/TechDraw/App/DrawView.h +++ b/src/Mod/TechDraw/App/DrawView.h @@ -58,7 +58,7 @@ public: App::PropertyFloatConstraint Scale; App::PropertyEnumeration ScaleType; - App::PropertyFloat Rotation; + App::PropertyAngle Rotation; App::PropertyString Caption; /** @name methods override Feature */