add 2d features to body for drag and drop
This commit is contained in:
@@ -242,7 +242,7 @@ void CmdPartDesignBody::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
|
||||
// for sketches open the feature dialog to rebase it to a new pane
|
||||
// for sketches open the feature dialog to rebase it to a new plane
|
||||
// as requested in issue #0002862
|
||||
if (addtogroup) {
|
||||
std::vector<App::DocumentObject*> planes;
|
||||
|
||||
@@ -454,7 +454,13 @@ bool ViewProviderBody::canDropObject(App::DocumentObject* obj) const
|
||||
void ViewProviderBody::dropObject(App::DocumentObject* obj)
|
||||
{
|
||||
PartDesign::Body* body = static_cast<PartDesign::Body*>(getObject());
|
||||
body->BaseFeature.setValue(obj);
|
||||
if (obj->getTypeId().isDerivedFrom(Part::Part2DObject::getClassTypeId())) {
|
||||
body->addObject(obj);
|
||||
}
|
||||
else {
|
||||
body->BaseFeature.setValue(obj);
|
||||
}
|
||||
|
||||
App::Document* doc = body->getDocument();
|
||||
doc->recompute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user