From: mpv Date: Wed, 19 Aug 2015 08:26:46 +0000 (+0300) Subject: Debug of visualization of compsolids and sub-shapes X-Git-Tag: V_1.4.0_beta4~353 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=437ce7e2db9ab91af9c952596961941f54711d6e;p=modules%2Fshaper.git Debug of visualization of compsolids and sub-shapes --- diff --git a/src/Model/Model_ResultCompSolid.cpp b/src/Model/Model_ResultCompSolid.cpp index 263c7c33b..577bf7074 100755 --- a/src/Model/Model_ResultCompSolid.cpp +++ b/src/Model/Model_ResultCompSolid.cpp @@ -91,6 +91,7 @@ bool Model_ResultCompSolid::setDisabled(std::shared_ptr theThis bool aChanged = ModelAPI_ResultBody::setDisabled(theThis, theFlag); if (aChanged) { // state is changed, so modifications are needed myBuilder->evolutionToSelection(theFlag); + updateSubs(shape()); // to set disabled/enabled } return aChanged; } @@ -109,7 +110,7 @@ void Model_ResultCompSolid::updateSubs(const std::shared_ptr& the std::shared_ptr aSolidShape(new GeomAPI_Shape); aSolidShape->setImpl(new TopoDS_Shape(aSolids.Current())); ResultBodyPtr aSub; - if (mySubs.size() >= aSubIndex) { // it is needed to create a new sub-result + if (mySubs.size() <= aSubIndex) { // it is needed to create a new sub-result aSub = anObjects->createBody(this->data(), aSubIndex); mySubs.push_back(aSub); } else { // just update shape of this result @@ -124,7 +125,7 @@ void Model_ResultCompSolid::updateSubs(const std::shared_ptr& the aECreator->sendUpdated(aSub, EVENT_DISP); aECreator->sendUpdated(aSub, EVENT_UPD); } - aSub->setDisabled(aSub, false); + aSub->setDisabled(aSub, isDisabled()); } // erase left, unused results while(mySubs.size() > aSubIndex) { diff --git a/src/ModelAPI/ModelAPI_Feature.cpp b/src/ModelAPI/ModelAPI_Feature.cpp index 3d8e5d57f..11431a82c 100644 --- a/src/ModelAPI/ModelAPI_Feature.cpp +++ b/src/ModelAPI/ModelAPI_Feature.cpp @@ -79,6 +79,7 @@ void ModelAPI_Feature::eraseResultFromList(const std::shared_ptrgroupName(); + aRes->setDisabled(aRes, true); // for complex results to disable all subs aRes->data()->erase(); myResults.erase(aResIter); diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index af416570f..09fdef8f2 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -109,7 +109,7 @@ #include #endif -//#define DEBUG_COMPOSOLID +#define DEBUG_COMPOSOLID /*!Create and return new instance of XGUI_Module*/