From 4623f3a7d309110deb14d3d0b09a9cf9941e4fa0 Mon Sep 17 00:00:00 2001 From: jrheinlaender Date: Mon, 16 Sep 2013 20:38:39 +0200 Subject: [PATCH] Some code cosmetics --- src/Mod/PartDesign/App/DatumLine.cpp | 3 ++- src/Mod/PartDesign/App/DatumLine.h | 3 ++- src/Mod/PartDesign/App/DatumPlane.cpp | 2 +- src/Mod/PartDesign/App/DatumPlane.h | 3 ++- src/Mod/PartDesign/App/DatumPoint.cpp | 2 +- src/Mod/PartDesign/App/DatumPoint.h | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Mod/PartDesign/App/DatumLine.cpp b/src/Mod/PartDesign/App/DatumLine.cpp index 368226579..1134344fe 100644 --- a/src/Mod/PartDesign/App/DatumLine.cpp +++ b/src/Mod/PartDesign/App/DatumLine.cpp @@ -362,12 +362,13 @@ void Line::onChanged(const App::Property *prop) if (p1 != NULL) delete p1; if (p2 != NULL) delete p2; if (line != NULL) delete line; + if (circle != NULL) delete circle; } Part::Datum::onChanged(prop); } -const std::set Line::getHint() +const std::set Line::getHint() const { if (hints.find(refTypes) != hints.end()) return hints[refTypes]; diff --git a/src/Mod/PartDesign/App/DatumLine.h b/src/Mod/PartDesign/App/DatumLine.h index 14eaf3ef1..b67853649 100644 --- a/src/Mod/PartDesign/App/DatumLine.h +++ b/src/Mod/PartDesign/App/DatumLine.h @@ -45,7 +45,8 @@ public: } static void initHints(); - const std::set getHint(); + const std::set getHint() const; + const int offsetsAllowed() const; Base::Vector3d getBasePoint() const; Base::Vector3d getDirection() const; diff --git a/src/Mod/PartDesign/App/DatumPlane.cpp b/src/Mod/PartDesign/App/DatumPlane.cpp index 6415b5e1f..0ab7582b0 100644 --- a/src/Mod/PartDesign/App/DatumPlane.cpp +++ b/src/Mod/PartDesign/App/DatumPlane.cpp @@ -358,7 +358,7 @@ void Plane::onChanged(const App::Property *prop) } -const std::set Plane::getHint() +const std::set Plane::getHint() const { if (hints.find(refTypes) != hints.end()) return hints[refTypes]; diff --git a/src/Mod/PartDesign/App/DatumPlane.h b/src/Mod/PartDesign/App/DatumPlane.h index d64ed6900..3d78165b6 100644 --- a/src/Mod/PartDesign/App/DatumPlane.h +++ b/src/Mod/PartDesign/App/DatumPlane.h @@ -44,7 +44,8 @@ public: } static void initHints(); - const std::set getHint(); + const std::set getHint() const; + const int offsetsAllowed() const; Base::Vector3d getBasePoint(); Base::Vector3d getNormal(); diff --git a/src/Mod/PartDesign/App/DatumPoint.cpp b/src/Mod/PartDesign/App/DatumPoint.cpp index b60412fe7..1a3d9b667 100644 --- a/src/Mod/PartDesign/App/DatumPoint.cpp +++ b/src/Mod/PartDesign/App/DatumPoint.cpp @@ -362,7 +362,7 @@ Base::Vector3d Point::getPoint() } -const std::set Point::getHint() +const std::set Point::getHint() const { if (hints.find(refTypes) != hints.end()) return hints[refTypes]; diff --git a/src/Mod/PartDesign/App/DatumPoint.h b/src/Mod/PartDesign/App/DatumPoint.h index 8f9be2b2d..0a23e064d 100644 --- a/src/Mod/PartDesign/App/DatumPoint.h +++ b/src/Mod/PartDesign/App/DatumPoint.h @@ -45,7 +45,8 @@ public: } static void initHints(); - const std::set getHint(); + const std::set getHint() const; + const int offsetsAllowed() const; Base::Vector3d getPoint();