diff --git a/src/Mod/TechDraw/App/DrawViewClip.cpp b/src/Mod/TechDraw/App/DrawViewClip.cpp index d9f0fdabe9..479f89275b 100644 --- a/src/Mod/TechDraw/App/DrawViewClip.cpp +++ b/src/Mod/TechDraw/App/DrawViewClip.cpp @@ -124,14 +124,12 @@ App::DocumentObjectExecReturn *DrawViewClip::execute(void) short DrawViewClip::mustExecute() const { - short result = 0; if (!isRestoring()) { - result = ( Height.isTouched() || - Width.isTouched() || - Views.isTouched()); - } - if (result) { - return result; + if (Height.isTouched() || + Width.isTouched() || + Views.isTouched()) { + return true; + } } return TechDraw::DrawView::mustExecute(); } @@ -151,14 +149,13 @@ std::vector DrawViewClip::getChildViewNames() bool DrawViewClip::isViewInClip(App::DocumentObject* view) { - bool result = false; std::vector children = Views.getValues(); for (std::vector::iterator it = children.begin(); it != children.end(); ++it) { if ((*it) == view) { - result = true; + return true; } } - return result; + return false; } PyObject *DrawViewClip::getPyObject(void)