Core: Set ::Remove flag before calling breakLinks (#22759)
* Ensure the ::Remove flag of DocumentObject is set to true before calls to breakLinks * TechDraw: remove then add balloon annotation when changing the SourceView * Revert "TechDraw: remove then add balloon annotation when changing the SourceView" This reverts commit 483b4fe4a0715ff63c2669af33fc3beb60a93f54.
This commit is contained in:
@@ -3282,6 +3282,8 @@ void Document::_removeObject(DocumentObject* pcObject, RemoveObjectOptions optio
|
||||
pcObject->unsetupObject();
|
||||
}
|
||||
signalDeletedObject(*pcObject);
|
||||
signalTransactionRemove(*pcObject, d->rollback ? nullptr : d->activeUndoTransaction);
|
||||
breakDependency(pcObject, true);
|
||||
|
||||
// TODO Check me if it's needed (2015-09-01, Fat-Zer)
|
||||
// remove the tip if needed
|
||||
@@ -3298,16 +3300,8 @@ void Document::_removeObject(DocumentObject* pcObject, RemoveObjectOptions optio
|
||||
|
||||
// do no transactions if we do a rollback!
|
||||
if (!d->rollback && d->activeUndoTransaction) {
|
||||
// Undo stuff
|
||||
signalTransactionRemove(*pcObject, d->activeUndoTransaction);
|
||||
breakDependency(pcObject, true);
|
||||
d->activeUndoTransaction->addObjectNew(pcObject);
|
||||
}
|
||||
else {
|
||||
// for a rollback delete the object
|
||||
signalTransactionRemove(*pcObject, 0);
|
||||
breakDependency(pcObject, true);
|
||||
}
|
||||
|
||||
std::unique_ptr<DocumentObject> tobedestroyed;
|
||||
if ((options.testFlag(RemoveObjectOption::MayDestroyOutOfTransaction) && !d->rollback && !d->activeUndoTransaction)
|
||||
|
||||
Reference in New Issue
Block a user