diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index ebbfe9b4..c711385b 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -942,7 +942,6 @@ void UBDocumentTreeModel::moveIndexes(const QModelIndexList &source, const QMode fixNodeName(s, destinationParent); sourceNode->parentNode()->moveChild(sourceNode, destIndex, newParentNode); updateIndexNameBindings(sourceNode); - hasOneInsertion = true; } } @@ -1224,6 +1223,7 @@ void UBDocumentTreeModel::updateIndexNameBindings(UBDocumentTreeNode *nd) } else if (nd->proxyData()) { nd->proxyData()->setMetaData(UBSettings::documentGroupName, virtualPathForIndex(indexForNode(nd->parentNode()))); nd->proxyData()->setMetaData(UBSettings::documentName, nd->nodeName()); + nd->proxyData()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); UBPersistenceManager::persistenceManager()->persistDocumentMetadata(nd->proxyData()); } } diff --git a/src/document/UBDocumentProxy.cpp b/src/document/UBDocumentProxy.cpp index cebd7126..6f9aa711 100644 --- a/src/document/UBDocumentProxy.cpp +++ b/src/document/UBDocumentProxy.cpp @@ -260,7 +260,7 @@ QDateTime UBDocumentProxy::lastUpdate() { if(mMetaDatas.contains(UBSettings::documentUpdatedAt)) return UBStringUtils::fromUtcIsoDate(metaData(UBSettings::documentUpdatedAt).toString()); - return QDateTime().currentDateTime(); + return QDateTime::currentDateTime(); } bool UBDocumentProxy::isModified() const