From 060ff25ac33a92c74fdcaaaa77cf4aeb3bf16fee Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 30 Sep 2014 09:38:22 +0400 Subject: [PATCH] Issue #172: set the loaded document active to load features of Part correctly --- src/Model/Model_Document.cpp | 2 ++ src/SketchPlugin/plugin-Sketch.xml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index c51d32a74..e583a0fb8 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -146,6 +146,8 @@ bool Model_Document::load(const char* theFileName) } if (!isError) { myDoc->SetUndoLimit(UNDO_LIMIT); + // to avoid the problem that feature is created in the current, not this, document + Model_Session::get()->setActiveDocument(anApp->getDocument(myID)); synchronizeFeatures(); } return !isError; diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 6ec011c98..e002f0108 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -40,7 +40,9 @@ - + + + -- 2.39.2