]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix regressions found by unit testing
authorazv <azv@opencascade.com>
Tue, 19 Nov 2019 08:55:00 +0000 (11:55 +0300)
committerazv <azv@opencascade.com>
Tue, 19 Nov 2019 08:55:00 +0000 (11:55 +0300)
src/Model/Model_Application.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelection.h
src/SketchPlugin/SketchPlugin_Sketch.cpp

index 0d5e6eeb0c3bda1424481d14a9ae0bab13836bae..9dcb0bd55bf54245f19e73b059ba1ac7027a8dff 100644 (file)
@@ -171,7 +171,7 @@ Model_Application::Model_Application()
   static Handle(Model_Application) TheKeepHandle;
   TheKeepHandle = this;
   // additional file format supported
-  static TCollection_ExtendedString THE_DOC_FORMAT("BinOcaf"/*"BinShaperPart"*/);
+  static TCollection_ExtendedString THE_DOC_FORMAT("BinShaperPart");
   static TCollection_ExtendedString THE_FILE_EXT("shaperpart");
   Handle(PCDM_RetrievalDriver) aReader =
       Handle(PCDM_RetrievalDriver)::DownCast(TheKeepHandle->ReaderFromFormat("BinOcaf"));
index edec79b6c489955baeaa44437fa16b03dea95e25..5ec767a0a525920872abc1a4b893ebb5f2bfd432 100644 (file)
@@ -2018,3 +2018,9 @@ TDF_Label Model_AttributeSelection::baseDocumentLab()
   static TDF_Label anEmpty;
   return anEmpty;
 }
+
+void Model_AttributeSelection::reset()
+{
+  ModelAPI_AttributeSelection::reset();
+  myRef.reset();
+}
index bd26925b3fd229cac2ab96282b2d645a01fa4407..50a7ddbb91645726c340b095ce6db0ac97e3acd8 100644 (file)
@@ -143,6 +143,9 @@ public:
   /// Makes the current local selection becomes all sub-shapes with same base geometry.
   MODEL_EXPORT virtual void combineGeometrical();
 
+  /// Resets attribute to deafult state
+  MODEL_EXPORT virtual void reset();
+
 protected:
   /// Objects are created for features automatically
   MODEL_EXPORT Model_AttributeSelection(TDF_Label& theLabel);
index 32e0ec7a1ffcdf67632807ea5cd1e63827bc5d2c..692ac5d0ed2be3377aad617f6744f1ca75773a5d 100644 (file)
@@ -326,8 +326,7 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) {
           std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
             data()->attribute(SketchPlugin_Sketch::DIRX_ID()));
           aDirX->setValue(aXDir);
-          std::shared_ptr<GeomAPI_Dir> aDir = aPlane->direction();
-          data()->blockSendAttributeUpdated(aWasBlocked, false);
+          data()->blockSendAttributeUpdated(aWasBlocked, true);
         }
       }
     }