]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #172: set the loaded document active to load features of Part correctly
authormpv <mikhail.ponikarov@opencascade.com>
Tue, 30 Sep 2014 05:38:22 +0000 (09:38 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Tue, 30 Sep 2014 05:38:22 +0000 (09:38 +0400)
src/Model/Model_Document.cpp
src/SketchPlugin/plugin-Sketch.xml

index c51d32a74d523db9b02a0c186ceecab79f9421aa..e583a0fb8b1698aa71045bad491113ae302ebbff 100644 (file)
@@ -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;
index 6ec011c98b66abc10368e815373c1b880b455516..e002f01088da13a68163c8ba9917de0370453c4f 100644 (file)
@@ -40,7 +40,9 @@
           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
         </feature_or_attribute_selector>
         <point_selector id="ConstraintFlyoutValuePnt" internal="1" obligatory="0"/>
-        <doublevalue_editor label="Value" tooltip="Constraint value" id="ConstraintValue" default="computed"/>
+        <doublevalue_editor label="Value" tooltip="Constraint value" id="ConstraintValue" default="computed">
+          <validator id="GeomValidators_Positive"/>
+        </doublevalue_editor>
         <validator id="PartSet_DistanceValidator"/>
       </feature>