[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
@@ -35,6 +35,7 @@
|
||||
#include "QGIViewClip.h"
|
||||
|
||||
using namespace TechDrawGui;
|
||||
using namespace TechDraw;
|
||||
|
||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderViewClip, TechDrawGui::ViewProviderDrawingView)
|
||||
|
||||
@@ -123,7 +124,8 @@ void ViewProviderViewClip::dragObject(App::DocumentObject* docObj)
|
||||
|
||||
void ViewProviderViewClip::dropObject(App::DocumentObject* docObj)
|
||||
{
|
||||
if (docObj->isDerivedFrom<TechDraw::DrawProjGroupItem>()) {
|
||||
auto dvp = freecad_cast<DrawViewPart*>(docObj);
|
||||
if (dvp && DrawView::isProjGroupItem(dvp)) {
|
||||
//DPGI can not be dropped onto the Page if it belongs to DPG
|
||||
auto* dpgi = static_cast<TechDraw::DrawProjGroupItem*>(docObj);
|
||||
if (dpgi->getPGroup()) {
|
||||
|
||||
Reference in New Issue
Block a user