App/GeoFeatureGroup: derive from DocumentObjectGroup
Refactor GeoFeatureGroup and derive it from DocumentObjectGroup rather than GeoFeatureObject to unify code of those two classes.
This commit is contained in:
committed by
Stefan Tröger
parent
76b4685b5f
commit
dbb5786ffd
@@ -81,24 +81,6 @@ PyObject *Part::getPyObject()
|
||||
return Py::new_reference_to(PythonObject);
|
||||
}
|
||||
|
||||
void Part::onSettingDocument() {
|
||||
|
||||
if(connection.connected())
|
||||
connection.disconnect();
|
||||
|
||||
getDocument()->signalDeletedObject.connect(boost::bind(&Part::onDelete, this, _1));
|
||||
App::DocumentObject::onSettingDocument();
|
||||
}
|
||||
|
||||
void Part::onDelete(const App::DocumentObject& obj) {
|
||||
|
||||
if(&obj == this) {
|
||||
//delete all child objects if needed
|
||||
this->removeObjectsFromDocument();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Python feature ---------------------------------------------------------
|
||||
|
||||
// Not quit sure yet makeing Part derivable in Python is good Idea!
|
||||
|
||||
Reference in New Issue
Block a user