From 5783b5453ddafb47682dfdc878ce0086950a0449 Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Thu, 26 Aug 2021 11:07:08 +0200 Subject: [PATCH] LIB: Fix the rename/copy because the `name` field from the AbstractDocument was not being updated during the copy/rename operation --- src/Lib/Document/VivyDocument.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Lib/Document/VivyDocument.cc b/src/Lib/Document/VivyDocument.cc index 377425de..d907d412 100644 --- a/src/Lib/Document/VivyDocument.cc +++ b/src/Lib/Document/VivyDocument.cc @@ -245,6 +245,7 @@ VivyDocument::copy(const QString &newName) copyWith(newPath, [=, this]() noexcept -> void { documentLocation = newPath.dir(); documentName = newPath.baseName(); + name = newPath.absoluteFilePath(); }); } @@ -266,6 +267,7 @@ VivyDocument::rename(const QString &newName) renameWith(newPath, [=, this]() noexcept -> void { documentLocation = newPath.dir(); documentName = newPath.baseName(); + name = newPath.absoluteFilePath(); }); } @@ -285,6 +287,7 @@ VivyDocument::saveMemoryFile(const QFileInfo &newPath) { documentName = newPath.baseName(); documentLocation = newPath.absoluteDir(); + name = newPath.absoluteFilePath(); documentOptions = static_cast<Options>(documentOptions & (~MemoryDocumentCreation)); qDebug().nospace() << "Renaming a memory file => create it on disk with { " << documentLocation << ", " << documentName << " }"; -- GitLab