persist metadata when docs are renamed by the replace dialog

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent c9826bbe6b
commit 43f2aba2cc
  1. 7
      src/core/UBPersistenceManager.cpp

@ -256,7 +256,12 @@ QDialog::DialogCode UBPersistenceManager::processInteractiveReplacementDialog(UB
mDocumentTreeStructureModel->removeRow(i, parentIndex); mDocumentTreeStructureModel->removeRow(i, parentIndex);
} }
} }
pProxy->setMetaData(UBSettings::documentName, resultName);
if (docName != resultName)
{
pProxy->setMetaData(UBSettings::documentName, resultName);
UBMetadataDcSubsetAdaptor::persist(pProxy);
}
mDocumentTreeStructureModel->addDocument(pProxy, parentIndex); mDocumentTreeStructureModel->addDocument(pProxy, parentIndex);
} }
replaceDialog->setParent(0); replaceDialog->setParent(0);

Loading…
Cancel
Save