prevent parts from being dragged into parts

This commit is contained in:
Stefan Tröger
2016-01-15 19:24:57 +01:00
parent 3c39410002
commit d6a2acbd3a
2 changed files with 11 additions and 0 deletions

View File

@@ -72,6 +72,16 @@ bool ViewProviderPart::doubleClicked(void)
return true;
}
bool ViewProviderPart::canDropObject(App::DocumentObject* obj) const {
//it is not allowed to have any part or assembly object within a part, hence we exclude origin groups
if(obj->isDerivedFrom(App::OriginGroup::getClassTypeId()))
return false;
return Gui::ViewProvider::canDropObject(obj);
}
/**
* Returns the pixmap for the list item.
*/