diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 90a160c4..8d1759f6 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -256,7 +256,12 @@ QDialog::DialogCode UBPersistenceManager::processInteractiveReplacementDialog(UB mDocumentTreeStructureModel->removeRow(i, parentIndex); } } - pProxy->setMetaData(UBSettings::documentName, resultName); + + if (docName != resultName) + { + pProxy->setMetaData(UBSettings::documentName, resultName); + UBMetadataDcSubsetAdaptor::persist(pProxy); + } mDocumentTreeStructureModel->addDocument(pProxy, parentIndex); } replaceDialog->setParent(0);