diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-03-15 13:53:19 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-03-18 10:14:07 +0000 |
commit | 046b6d98e2f28b1520a9d456d9aa752a2d941759 (patch) | |
tree | f088b33d9a27568f95a78f09dae61589cc1a6147 | |
parent | d7e63fe1295c524d7e3d8d81a98f60accc7ddd5a (diff) |
Commit open transactions when launching a preview viewer
Task-number: QT3DS-3070
Change-Id: I47f552cd4e643fb8276582eb0701c6dc74306a0e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/Authoring/Studio/Application/ProjectFile.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Authoring/Studio/Application/ProjectFile.cpp b/src/Authoring/Studio/Application/ProjectFile.cpp index e35eb033..98f5fa74 100644 --- a/src/Authoring/Studio/Application/ProjectFile.cpp +++ b/src/Authoring/Studio/Application/ProjectFile.cpp @@ -416,6 +416,10 @@ QString ProjectFile::createPreview() { CDoc *doc = g_StudioApp.GetCore()->GetDoc(); QString uipPrvPath = doc->GetDocumentPath(); + + // Commit all open transactions + doc->IKnowWhatIAmDoingForceCloseTransaction(); + // create a preview uip if doc modified if (doc->IsModified()) { uipPrvPath.replace(QLatin1String(".uip"), QLatin1String("_@preview@.uip")); |