From: azv Date: Tue, 19 Nov 2019 08:55:00 +0000 (+0300) Subject: Fix regressions found by unit testing X-Git-Tag: V9_5_0a1~166^2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5cdcd59044de5d32f1b3d3dcf85610173ee2775b;p=modules%2Fshaper.git Fix regressions found by unit testing --- diff --git a/src/Model/Model_Application.cpp b/src/Model/Model_Application.cpp index 0d5e6eeb0..9dcb0bd55 100644 --- a/src/Model/Model_Application.cpp +++ b/src/Model/Model_Application.cpp @@ -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")); diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index edec79b6c..5ec767a0a 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -2018,3 +2018,9 @@ TDF_Label Model_AttributeSelection::baseDocumentLab() static TDF_Label anEmpty; return anEmpty; } + +void Model_AttributeSelection::reset() +{ + ModelAPI_AttributeSelection::reset(); + myRef.reset(); +} diff --git a/src/Model/Model_AttributeSelection.h b/src/Model/Model_AttributeSelection.h index bd26925b3..50a7ddbb9 100644 --- a/src/Model/Model_AttributeSelection.h +++ b/src/Model/Model_AttributeSelection.h @@ -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); diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index 32e0ec7a1..692ac5d0e 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -326,8 +326,7 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) { std::shared_ptr aDirX = std::dynamic_pointer_cast( data()->attribute(SketchPlugin_Sketch::DIRX_ID())); aDirX->setValue(aXDir); - std::shared_ptr aDir = aPlane->direction(); - data()->blockSendAttributeUpdated(aWasBlocked, false); + data()->blockSendAttributeUpdated(aWasBlocked, true); } } }