rename method from remObject to removeObject to be more readable
This commit is contained in:
@@ -2589,7 +2589,7 @@ void Document::_addObject(DocumentObject* pcObject, const char* pObjectName)
|
||||
}
|
||||
|
||||
/// Remove an object out of the document
|
||||
void Document::remObject(const char* sName)
|
||||
void Document::removeObject(const char* sName)
|
||||
{
|
||||
std::map<std::string,DocumentObject*>::iterator pos = d->objectMap.find(sName);
|
||||
|
||||
@@ -2669,9 +2669,9 @@ void Document::remObject(const char* sName)
|
||||
}
|
||||
|
||||
/// Remove an object out of the document (internal)
|
||||
void Document::_remObject(DocumentObject* pcObject)
|
||||
void Document::_removeObject(DocumentObject* pcObject)
|
||||
{
|
||||
// TODO Refactoring: share code with Document::remObject() (2015-09-01, Fat-Zer)
|
||||
// TODO Refactoring: share code with Document::removeObject() (2015-09-01, Fat-Zer)
|
||||
_checkTransaction(pcObject);
|
||||
|
||||
std::map<std::string,DocumentObject*>::iterator pos = d->objectMap.find(pcObject->getNameInDocument());
|
||||
@@ -2833,7 +2833,7 @@ DocumentObject* Document::moveObject(DocumentObject* obj, bool recursive)
|
||||
// all object of the other document that refer to this object must be nullified
|
||||
that->breakDependency(obj, false);
|
||||
std::string objname = getUniqueObjectName(obj->getNameInDocument());
|
||||
that->_remObject(obj);
|
||||
that->_removeObject(obj);
|
||||
this->_addObject(obj, objname.c_str());
|
||||
obj->setDocument(this);
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
*/
|
||||
std::vector<DocumentObject *>addObjects(const char* sType, const std::vector<std::string>& objectNames, bool isNew=true);
|
||||
/// Remove a feature out of the document
|
||||
void remObject(const char* sName);
|
||||
void removeObject(const char* sName);
|
||||
/** Add an existing feature with sName (ASCII) to this document and set it active.
|
||||
* Unicode names are set through the Label property.
|
||||
* This is an overloaded function of the function above and can be used to create
|
||||
@@ -353,7 +353,7 @@ protected:
|
||||
/// Construction
|
||||
Document(void);
|
||||
|
||||
void _remObject(DocumentObject* pcObject);
|
||||
void _removeObject(DocumentObject* pcObject);
|
||||
void _addObject(DocumentObject* pcObject, const char* pObjectName);
|
||||
/// checks if a valid transaction is open
|
||||
void _checkTransaction(DocumentObject* pcObject);
|
||||
|
||||
@@ -279,7 +279,7 @@ PyObject* DocumentPy::removeObject(PyObject *args)
|
||||
|
||||
DocumentObject *pcFtr = getDocumentPtr()->getObject(sName);
|
||||
if(pcFtr) {
|
||||
getDocumentPtr()->remObject( sName );
|
||||
getDocumentPtr()->removeObject( sName );
|
||||
Py_Return;
|
||||
} else {
|
||||
std::stringstream str;
|
||||
|
||||
@@ -53,7 +53,7 @@ DocumentObject* GroupExtension::addObject(const char* sType, const char* pObject
|
||||
{
|
||||
DocumentObject* obj = getExtendedObject()->getDocument()->addObject(sType, pObjectName);
|
||||
if(!allowObject(obj)) {
|
||||
getExtendedObject()->getDocument()->remObject(obj->getNameInDocument());
|
||||
getExtendedObject()->getDocument()->removeObject(obj->getNameInDocument());
|
||||
return nullptr;
|
||||
}
|
||||
if (obj) addObject(obj);
|
||||
@@ -160,7 +160,7 @@ void GroupExtension::removeObjectFromDocument(DocumentObject* obj)
|
||||
grp->removeObjectsFromDocument();
|
||||
}
|
||||
|
||||
getExtendedObject()->getDocument()->remObject(obj->getNameInDocument());
|
||||
getExtendedObject()->getDocument()->removeObject(obj->getNameInDocument());
|
||||
}
|
||||
|
||||
DocumentObject *GroupExtension::getObject(const char *Name) const
|
||||
|
||||
@@ -175,7 +175,7 @@ void Origin::unsetupObject () {
|
||||
const auto &objsLnk = OriginFeatures.getValues ();
|
||||
if ( std::find(objsLnk.begin(), objsLnk.end(), obj) != objsLnk.end()) {
|
||||
if ( ! obj->isRemoving() ) {
|
||||
obj->getDocument()->remObject (obj->getNameInDocument());
|
||||
obj->getDocument()->removeObject (obj->getNameInDocument());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void OriginGroupExtension::onExtendedSetupObject () {
|
||||
void OriginGroupExtension::onExtendedUnsetupObject () {
|
||||
App::DocumentObject *origin = Origin.getValue ();
|
||||
if (origin && !origin->isRemoving ()) {
|
||||
origin->getDocument ()->remObject (origin->getNameInDocument());
|
||||
origin->getDocument ()->removeObject (origin->getNameInDocument());
|
||||
}
|
||||
|
||||
GeoFeatureGroupExtension::onExtendedUnsetupObject ();
|
||||
|
||||
@@ -349,7 +349,7 @@ void TransactionDocumentObject::applyDel(Document &Doc, TransactionalObject *pcO
|
||||
link->_removeBackLink(obj);
|
||||
|
||||
// simply filling in the saved object
|
||||
Doc._remObject(obj);
|
||||
Doc._removeObject(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ void orthoview::set_data(int r_x, int r_y)
|
||||
|
||||
void orthoview::deleteme()
|
||||
{
|
||||
parent_doc->remObject(myname.c_str());
|
||||
parent_doc->removeObject(myname.c_str());
|
||||
}
|
||||
|
||||
void orthoview::setPos(float px, float py)
|
||||
|
||||
@@ -170,7 +170,7 @@ void TaskFemConstraint::onButtonWizCancel()
|
||||
{
|
||||
Fem::Constraint* pcConstraint = static_cast<Fem::Constraint*>(ConstraintView->getObject());
|
||||
if (pcConstraint != NULL)
|
||||
pcConstraint->getDocument()->remObject(pcConstraint->getNameInDocument());
|
||||
pcConstraint->getDocument()->removeObject(pcConstraint->getNameInDocument());
|
||||
onButtonWizOk();
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ void TaskMultiTransformParameters::onTransformDelete()
|
||||
std::vector<App::DocumentObject*> transformFeatures = pcMultiTransform->Transformations.getValues();
|
||||
|
||||
App::DocumentObject* feature = transformFeatures[row];
|
||||
pcMultiTransform->getDocument()->remObject(feature->getNameInDocument());
|
||||
pcMultiTransform->getDocument()->removeObject(feature->getNameInDocument());
|
||||
closeSubTask();
|
||||
|
||||
transformFeatures.erase(transformFeatures.begin() + row);
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
}
|
||||
void execute()
|
||||
{
|
||||
doc->remObject(this->name.c_str());
|
||||
doc->removeObject(this->name.c_str());
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -424,7 +424,7 @@ int DrawProjGroup::removeProjection(const char *viewProjType)
|
||||
if( projPtr ) {
|
||||
if ( strcmp(viewProjType, projPtr->Type.getValueAsString()) == 0 ) {
|
||||
removeView(projPtr); // Remove from collection
|
||||
getDocument()->remObject( it->getNameInDocument() ); // Remove from the document
|
||||
getDocument()->removeObject( it->getNameInDocument() ); // Remove from the document
|
||||
moveToCentre();
|
||||
return Views.getValues().size();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user