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:
Alexander Golubev
2015-08-28 00:09:41 +03:00
committed by Stefan Tröger
parent 76b4685b5f
commit dbb5786ffd
18 changed files with 167 additions and 439 deletions

View File

@@ -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!