Fixed bug that did not allow selecting datum planes as external references in sketches

This commit is contained in:
Jan Rheinländer
2013-12-04 20:40:37 +01:00
committed by Stefan Tröger
parent 67889a2f40
commit 0ada1d1b12
2 changed files with 9 additions and 5 deletions

View File

@@ -1707,10 +1707,11 @@ bool SketchObject::isExternalAllowed(App::Document *pDoc, App::DocumentObject *p
{
// Externals outside of the Document are NOT allowed
if (this->getDocument() != pDoc)
return false;
return false;
// Note: Checking for the body of the support doesn't work when the support are the three base planes
App::DocumentObject *support = this->Support.getValue();
Part::BodyBase* body = Part::BodyBase::findBodyOf(support);
Part::BodyBase* body = Part::BodyBase::findBodyOf(this);
if (body != NULL) {
if (Part::BodyBase::findBodyOf(pObj) != body) {
// Selection outside of body not allowed if flag is not set