From: mpv Date: Tue, 30 Sep 2014 05:38:22 +0000 (+0400) Subject: Issue #172: set the loaded document active to load features of Part correctly X-Git-Tag: V_0.4.4~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=060ff25ac33a92c74fdcaaaa77cf4aeb3bf16fee;p=modules%2Fshaper.git Issue #172: set the loaded document active to load features of Part correctly --- 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 @@ - + + +