Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 5783b545 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

LIB: Fix the rename/copy because the `name` field from the AbstractDocument...

LIB: Fix the rename/copy because the `name` field from the AbstractDocument was not being updated during the copy/rename operation
parent 57609a75
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!18Implement the VivyDocument specification
...@@ -245,6 +245,7 @@ VivyDocument::copy(const QString &newName) ...@@ -245,6 +245,7 @@ VivyDocument::copy(const QString &newName)
copyWith(newPath, [=, this]() noexcept -> void { copyWith(newPath, [=, this]() noexcept -> void {
documentLocation = newPath.dir(); documentLocation = newPath.dir();
documentName = newPath.baseName(); documentName = newPath.baseName();
name = newPath.absoluteFilePath();
}); });
} }
...@@ -266,6 +267,7 @@ VivyDocument::rename(const QString &newName) ...@@ -266,6 +267,7 @@ VivyDocument::rename(const QString &newName)
renameWith(newPath, [=, this]() noexcept -> void { renameWith(newPath, [=, this]() noexcept -> void {
documentLocation = newPath.dir(); documentLocation = newPath.dir();
documentName = newPath.baseName(); documentName = newPath.baseName();
name = newPath.absoluteFilePath();
}); });
} }
...@@ -285,6 +287,7 @@ VivyDocument::saveMemoryFile(const QFileInfo &newPath) ...@@ -285,6 +287,7 @@ VivyDocument::saveMemoryFile(const QFileInfo &newPath)
{ {
documentName = newPath.baseName(); documentName = newPath.baseName();
documentLocation = newPath.absoluteDir(); documentLocation = newPath.absoluteDir();
name = newPath.absoluteFilePath();
documentOptions = static_cast<Options>(documentOptions & (~MemoryDocumentCreation)); documentOptions = static_cast<Options>(documentOptions & (~MemoryDocumentCreation));
qDebug().nospace() << "Renaming a memory file => create it on disk with { " << documentLocation qDebug().nospace() << "Renaming a memory file => create it on disk with { " << documentLocation
<< ", " << documentName << " }"; << ", " << documentName << " }";
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter