diff --git a/src/Mod/TechDraw/App/DrawProjGroup.h b/src/Mod/TechDraw/App/DrawProjGroup.h index 0ad35a4171..7f738f4e8a 100644 --- a/src/Mod/TechDraw/App/DrawProjGroup.h +++ b/src/Mod/TechDraw/App/DrawProjGroup.h @@ -51,7 +51,7 @@ class DrawProjGroupItem; class TechDrawExport DrawProjGroup : public TechDraw::DrawViewCollection { PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawProjGroup); - + public: /// Constructor DrawProjGroup(); @@ -121,14 +121,14 @@ public: void setAnchorDirection(Base::Vector3d dir); Base::Vector3d getAnchorDirection(); TechDraw::DrawProjGroupItem* getAnchor(); - std::pair getDirsFromFront(DrawProjGroupItem* view); - std::pair getDirsFromFront(std::string viewType); + std::pair getDirsFromFront(DrawProjGroupItem* view); + std::pair getDirsFromFront(std::string viewType); void updateSecondaryDirs(); void rotate(const std::string &rotationdirection); void spin(const std::string &spindirection); - + void dumpISO(const char * title); std::vector getViewsAsDPGI(); diff --git a/src/Mod/TechDraw/App/DrawProjGroupItem.h b/src/Mod/TechDraw/App/DrawProjGroupItem.h index 06d8eb2663..390fb979c4 100644 --- a/src/Mod/TechDraw/App/DrawProjGroupItem.h +++ b/src/Mod/TechDraw/App/DrawProjGroupItem.h @@ -47,7 +47,7 @@ enum ProjItemType{ Front, FrontTopRight, FrontBottomLeft, FrontBottomRight }; - + class DrawProjGroup; class TechDrawExport DrawProjGroupItem : public TechDraw::DrawViewPart diff --git a/src/Mod/TechDraw/App/DrawView.cpp b/src/Mod/TechDraw/App/DrawView.cpp index ed10b4cf4f..390a8e4125 100644 --- a/src/Mod/TechDraw/App/DrawView.cpp +++ b/src/Mod/TechDraw/App/DrawView.cpp @@ -132,7 +132,7 @@ void DrawView::onChanged(const App::Property* prop) if (prop == &ScaleType) { auto page = findParentPage(); if (ScaleType.isValue("Page")) { - Scale.setStatus(App::Property::ReadOnly,true); + Scale.setStatus(App::Property::ReadOnly, true); if (page) { if(std::abs(page->Scale.getValue() - getScale()) > FLT_EPSILON) { Scale.setValue(page->Scale.getValue()); @@ -140,11 +140,11 @@ void DrawView::onChanged(const App::Property* prop) } } else if ( ScaleType.isValue("Custom") ) { //don't change Scale - Scale.setStatus(App::Property::ReadOnly,false); + Scale.setStatus(App::Property::ReadOnly, false); } else if ( ScaleType.isValue("Automatic") ) { - Scale.setStatus(App::Property::ReadOnly,true); + Scale.setStatus(App::Property::ReadOnly, true); if (!checkFit(page)) { - double newScale = autoScale(page->getPageWidth(),page->getPageHeight()); + double newScale = autoScale(page->getPageWidth(), page->getPageHeight()); if(std::abs(newScale - getScale()) > FLT_EPSILON) { //stops onChanged/execute loop Scale.setValue(newScale); } @@ -153,7 +153,7 @@ void DrawView::onChanged(const App::Property* prop) } else if (prop == &LockPosition) { handleXYLock(); requestPaint(); //change lock icon - LockPosition.purgeTouched(); + LockPosition.purgeTouched(); } else if ((prop == &Caption) || (prop == &Label)) { requestPaint(); @@ -180,20 +180,20 @@ void DrawView::handleXYLock() { if (isLocked()) { if (!X.testStatus(App::Property::ReadOnly)) { - X.setStatus(App::Property::ReadOnly,true); + X.setStatus(App::Property::ReadOnly, true); X.purgeTouched(); } if (!Y.testStatus(App::Property::ReadOnly)) { - Y.setStatus(App::Property::ReadOnly,true); + Y.setStatus(App::Property::ReadOnly, true); Y.purgeTouched(); } } else { if (X.testStatus(App::Property::ReadOnly)) { - X.setStatus(App::Property::ReadOnly,false); + X.setStatus(App::Property::ReadOnly, false); X.purgeTouched(); } if (Y.testStatus(App::Property::ReadOnly)) { - Y.setStatus(App::Property::ReadOnly,false); + Y.setStatus(App::Property::ReadOnly, false); Y.purgeTouched(); } } @@ -360,7 +360,7 @@ double DrawView::autoScale() const return autoScale(w,h); } -//compare 1:1 rect of view to pagesize(pw,h) +//compare 1:1 rect of view to pagesize(pw,h) double DrawView::autoScale(double pw, double ph) const { // Base::Console().Message("DV::autoScale(Page: %.3f, %.3f) - %s\n", pw, ph, getNameInDocument()); @@ -374,7 +374,7 @@ double DrawView::autoScale(double pw, double ph) const double vbh = viewBox.height()/getScale(); double xScale = pw/vbw; // > 1 page bigger than figure double yScale = ph/vbh; // < 1 page is smaller than figure - double newScale = std::min(xScale,yScale) * fudgeFactor; + double newScale = std::min(xScale,yScale) * fudgeFactor; double sensibleScale = DrawUtil::sensibleScale(newScale); return sensibleScale; } @@ -457,8 +457,7 @@ std::vector DrawView::getLeaders() const return result; } -void DrawView::handleChangedPropertyType( - Base::XMLReader &reader, const char * TypeName, App::Property * prop) +void DrawView::handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) { if (prop == &Scale) { App::PropertyFloat tmp; @@ -472,7 +471,7 @@ void DrawView::handleChangedPropertyType( Scale.setValue(1.0); } } else { - // has Scale prop that isn't Float! + // has Scale prop that isn't Float! Base::Console().Log("DrawPage::Restore - old Document Scale is Not Float!\n"); // no idea } @@ -524,7 +523,7 @@ void DrawView::handleChangedPropertyType( Y2Property.Restore(reader); Y.setValue(Y2Property.getValue()); } - + // property Rotation had App::PropertyFloat and was changed to App::PropertyAngle else if (prop == &Rotation && strcmp(TypeName, "App::PropertyFloat") == 0) { App::PropertyFloat RotationProperty; @@ -561,7 +560,7 @@ int DrawView::prefScaleType() { Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General"); - int result = hGrp->GetInt("DefaultScaleType", 0); + int result = hGrp->GetInt("DefaultScaleType", 0); return result; } diff --git a/src/Mod/TechDraw/App/DrawViewAnnotation.h b/src/Mod/TechDraw/App/DrawViewAnnotation.h index d3f224af91..3841e0d9ea 100644 --- a/src/Mod/TechDraw/App/DrawViewAnnotation.h +++ b/src/Mod/TechDraw/App/DrawViewAnnotation.h @@ -69,7 +69,7 @@ public: protected: void onChanged(const App::Property* prop) override; - void handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property * prop) override; + void handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property * prop) override; private: static const char* TextStyleEnums[];