prevent parts from being dragged into parts
This commit is contained in:
parent
7d30833349
commit
2585598c55
|
@ -72,6 +72,16 @@ bool ViewProviderPart::doubleClicked(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ViewProviderPart::canDropObject(App::DocumentObject* obj) const {
|
||||
|
||||
//it is not allowed to have any part or assembly object within a part, hence we exclude origin groups
|
||||
if(obj->isDerivedFrom(App::OriginGroup::getClassTypeId()))
|
||||
return false;
|
||||
|
||||
return Gui::ViewProvider::canDropObject(obj);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the pixmap for the list item.
|
||||
*/
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
QIcon getIcon(void) const;
|
||||
|
||||
virtual bool doubleClicked(void);
|
||||
virtual bool canDropObject(App::DocumentObject*) const;
|
||||
protected:
|
||||
/// get called by the container whenever a property has been changed
|
||||
virtual void onChanged(const App::Property* prop);
|
||||
|
|
Loading…
Reference in New Issue
Block a user