Salome HOME
22784: EDF 8824 GHS3DPLUGIN: SetEnforcedVertexNamedWithGroup() does not add an extra...
authoreap <eap@opencascade.com>
Fri, 17 Oct 2014 14:45:17 +0000 (18:45 +0400)
committereap <eap@opencascade.com>
Fri, 17 Oct 2014 14:45:17 +0000 (18:45 +0400)
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
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_Utils.h

index 1ad00533a170e964b383b35dead87c964c2021e4..dcb5d7b1a36351088d8139e80118e655925a5c71 100644 (file)
@@ -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();
index 1fc82405f9f21577c7432ba1b2b38486c70ee275..8c1813f5636753b9da8cf4fa6521e4c69c2edf31 100644 (file)
@@ -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;
index d5ec25ed4a7134897d7371269f4a5a69f47d7e8f..5ac9ee97cfbd402878949c76a0e44dede4930078 100644 (file)
@@ -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) {}
   };