[Mod] Removed unnecessary function (#12772)

* Removed unnecessary function

the "renamedDocumentObjet" function does nothing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mosfet80
2024-03-11 18:20:32 +01:00
committed by GitHub
parent 9df1472e43
commit e9ec2422e1
3 changed files with 1 additions and 27 deletions

View File

@@ -1561,29 +1561,6 @@ void PropertySheet::onRemoveDep(App::DocumentObject* obj)
depConnections.erase(obj);
}
void PropertySheet::renamedDocumentObject(const App::DocumentObject* docObj)
{
#if 1
(void)docObj;
#else
if (documentObjectName.find(docObj) == documentObjectName.end()) {
return;
}
std::map<CellAddress, Cell*>::iterator i = data.begin();
while (i != data.end()) {
RelabelDocumentObjectExpressionVisitor<PropertySheet> v(*this, docObj);
i->second->visit(v);
if (v.changed()) {
v.reset();
recomputeDependencies(i->first);
setDirty(i->first);
}
++i;
}
#endif
}
void PropertySheet::onRelabeledDocument(const App::Document& doc)
{

View File

@@ -201,7 +201,6 @@ public:
void invalidateDependants(const App::DocumentObject* docObj);
void renamedDocumentObject(const App::DocumentObject* docObj);
void
renameObjectIdentifiers(const std::map<App::ObjectIdentifier, App::ObjectIdentifier>& paths);

View File

@@ -70,9 +70,7 @@ void SheetObserver::slotDeletedObject(const DocumentObject& Obj)
void SheetObserver::slotChangedObject(const DocumentObject& Obj, const Property& Prop)
{
if (&Prop == &Obj.Label) {
sheet->renamedDocumentObject(&Obj);
}
if (&Prop == &Obj.Label) {}
else {
const char* name = Obj.getPropertyName(&Prop);