Revert "part deletion handling"
This reverts commit 6ab2002021ac1df26ebe77f488f5cd94e1df0b26.
This commit is contained in:
committed by
Stefan Tröger
parent
e26c6174ac
commit
ade1dec103
@@ -2053,20 +2053,13 @@ void Document::_addObject(DocumentObject* pcObject, const char* pObjectName)
|
||||
}
|
||||
|
||||
/// Remove an object out of the document
|
||||
void Document::remObject(const char* sName, bool forceIfUndeletable)
|
||||
void Document::remObject(const char* sName)
|
||||
{
|
||||
std::map<std::string,DocumentObject*>::iterator pos = d->objectMap.find(sName);
|
||||
|
||||
// name not found?
|
||||
if (pos == d->objectMap.end())
|
||||
return;
|
||||
|
||||
// undeletable?
|
||||
if (pos->second->testStatus(ObjectStatus::Undeletable) && !forceIfUndeletable) {
|
||||
std::stringstream str;
|
||||
str << "Document object '" << pos->second->getNameInDocument() << "' is undeletable";
|
||||
throw Base::Exception(str.str());
|
||||
}
|
||||
|
||||
_checkTransaction(pos->second);
|
||||
|
||||
@@ -2130,7 +2123,7 @@ void Document::_remObject(DocumentObject* pcObject)
|
||||
_checkTransaction(pcObject);
|
||||
|
||||
std::map<std::string,DocumentObject*>::iterator pos = d->objectMap.find(pcObject->getNameInDocument());
|
||||
|
||||
|
||||
if (d->activeObject == pcObject)
|
||||
d->activeObject = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user