From 333b8ff2fb70f855dadfef145d7b13ebdf07f2cd Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 17 Oct 2014 18:45:17 +0400 Subject: [PATCH] 22784: EDF 8824 GHS3DPLUGIN: SetEnforcedVertexNamedWithGroup() does not add an extra group SMESH_Controls.cxx: add some protection against SIGSEGV SMESHGUI_MeshOp.cxx: at mesh edition,avoid selection of a sole existing hypothesis compatible with an assigned algo SMESHGUI_Utils.h: make class toStdStr usable. --- src/Controls/SMESH_Controls.cxx | 1 + src/SMESHGUI/SMESHGUI_MeshOp.cxx | 2 +- src/SMESHGUI/SMESHGUI_Utils.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 1ad00533a..dcb5d7b1a 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1954,6 +1954,7 @@ bool MultiConnection2D::Value::operator<(const MultiConnection2D::Value& x) cons } void MultiConnection2D::GetValues(MValues& theValues){ + if ( !myMesh ) return; SMDS_FaceIteratorPtr anIter = myMesh->facesIterator(); for(; anIter->more(); ){ const SMDS_MeshFace* anElem = anIter->next(); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 1fc82405f..8c1813f56 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -1555,7 +1555,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex, hypIndex = this->find( curHyp, myExistingHyps[ dim ][ type ]); else hypIndex = -1; - if ( !isSubmesh && hypIndex < 0 && anExisting.count() == 1 ) { + if ( !isSubmesh && myToCreate && hypIndex < 0 && anExisting.count() == 1 ) { // none is yet selected => select the sole existing if it is not optional CORBA::String_var hypTypeName = myExistingHyps[ dim ][ type ].first().first->GetName(); bool isOptional = true; diff --git a/src/SMESHGUI/SMESHGUI_Utils.h b/src/SMESHGUI/SMESHGUI_Utils.h index d5ec25ed4..5ac9ee97c 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.h +++ b/src/SMESHGUI/SMESHGUI_Utils.h @@ -204,7 +204,7 @@ SMESHGUI_EXPORT struct toQStr : public toStrT< QString > { toQStr( char* s ): toStrT< QString >(s) {} }; - class toStdStr : public toStrT< std::string > { + struct toStdStr : public toStrT< std::string > { toStdStr( char* s ): toStrT< std::string >(s) {} }; -- 2.30.2