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 4ebe22f166
commit 55fbbb5d6e
11 changed files with 245 additions and 239 deletions

View File

@@ -123,9 +123,12 @@ void ViewProviderPageExtension::extensionDropObject(App::DocumentObject* obj)
//this code used to live in ViewProviderPage
void ViewProviderPageExtension::dropObject(App::DocumentObject* obj)
{
if (obj->isDerivedFrom<TechDraw::DrawProjGroupItem>()) {
//DPGI can not be dropped onto the Page as it belongs to DPG, not Page
return;
if (docObj->isDerivedFrom<TechDraw::DrawProjGroupItem>()) {
//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 (obj->isDerivedFrom<App::Link>()) {
auto* link = static_cast<App::Link*>(obj);