From 7b925d11aa69ac405b423635adb1e2833f18a817 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 10 Apr 2016 18:01:27 +0200 Subject: [PATCH] + make 'Merge project' undo/redoable --- CMakeLists.txt | 2 +- src/Gui/CommandDoc.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8edab7abf..92336270c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set(FREECAD_VERSION "0.16") set(PACKAGE_NAME "FreeCAD") set(PACKAGE_VERSION_MAJOR "0") set(PACKAGE_VERSION_MINOR "16") -set(PACKAGE_VERSION_PATCH "6699") +set(PACKAGE_VERSION_PATCH "6700") set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 618495f0e..423b389b1 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -333,10 +333,13 @@ void StdCmdMergeProjects::activated(int iMsg) return; } + doc->openTransaction("Merge project"); Base::FileInfo fi((const char*)project.toUtf8()); Base::ifstream str(fi, std::ios::in | std::ios::binary); MergeDocuments md(doc); md.importObjects(str); + str.close(); + doc->commitTransaction(); } }