TechDraw: Insert tool insert DrawViewProjGroupItem that can then be transfered into groups and back.

This commit is contained in:
PaddleStroke
2024-04-05 09:42:52 +02:00
parent 5eb73cf949
commit 2b0403dc27
11 changed files with 245 additions and 239 deletions

View File

@@ -123,8 +123,11 @@ void ViewProviderViewClip::dragObject(App::DocumentObject* docObj)
void ViewProviderViewClip::dropObject(App::DocumentObject* docObj)
{
if (docObj->isDerivedFrom(TechDraw::DrawProjGroupItem::getClassTypeId())) {
//DPGI can not be dropped onto the Page as it belongs to DPG, not Page
return;
//DPGI can not be dropped onto the Page if it belongs to DPG
auto* dpgi = static_cast<TechDraw::DrawProjGroupItem*>(docObj);
if (dpgi->getPGroup()) {
return;
}
}
if (!docObj->isDerivedFrom(TechDraw::DrawView::getClassTypeId())) {
return;