[TD] Use isProjectGroupItem() in remaining cases
- isDerivedFrom<DrawProjGroupItem>() is no longer reliable due to smart view creation changes.
This commit is contained in:
committed by
Chris Hennes
parent
bbb15ea940
commit
3d7db8fb83
@@ -32,6 +32,7 @@
|
||||
|
||||
|
||||
using namespace TechDrawGui;
|
||||
using namespace TechDraw;
|
||||
|
||||
EXTENSION_PROPERTY_SOURCE(TechDrawGui::ViewProviderPageExtension, Gui::ViewProviderExtension)
|
||||
|
||||
@@ -122,7 +123,8 @@ void ViewProviderPageExtension::extensionDropObject(App::DocumentObject* obj)
|
||||
//this code used to live in ViewProviderPage
|
||||
void ViewProviderPageExtension::dropObject(App::DocumentObject* obj)
|
||||
{
|
||||
if (obj->isDerivedFrom<TechDraw::DrawProjGroupItem>()) {
|
||||
auto dvp = freecad_cast<TechDraw::DrawViewPart*>(obj);
|
||||
if (dvp && DrawView::isProjGroupItem(dvp)) {
|
||||
//DPGI can not be dropped onto the Page if it belongs to DPG
|
||||
auto* dpgi = static_cast<TechDraw::DrawProjGroupItem*>(obj);
|
||||
if (dpgi->getPGroup()) {
|
||||
|
||||
Reference in New Issue
Block a user