]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
IPAL21387 Unknown Exception after OK in Quadrangle Parameters Hypothesis dialog box.
authordmv <dmv@opencascade.com>
Thu, 15 Oct 2009 10:47:52 +0000 (10:47 +0000)
committerdmv <dmv@opencascade.com>
Thu, 15 Oct 2009 10:47:52 +0000 (10:47 +0000)
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h

index 690507e214fdb56a7cdb5bccd27e78604fb8a5f5..cce36edb06eb834c21c642d95c99e5bcee4ddd2b 100644 (file)
@@ -384,6 +384,12 @@ bool StdMeshersGUI_StdHypothesisCreator::checkParams( QString& msg ) const
       widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
     ok = ( w && w->IsOk() );
   }
+  else if ( hypType() == "QuadrangleParams" )
+  {
+    StdMeshersGUI_SubShapeSelectorWdg* w = 
+      widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
+    ok = ( w->GetListSize() > 0 );
+  }
   return ok;
 }
 
@@ -604,11 +610,11 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
       StdMeshersGUI_SubShapeSelectorWdg* w = 
         widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
       if (w) {
-        if( int id = w->GetListOfIDs()[0] ) {
-          h->SetTriaVertex( id );
+        if( w->GetListSize() > 0 ) {
+          h->SetTriaVertex( w->GetListOfIDs()[0] ); // getlist must be called once
+          const char * entry = w->GetMainShapeEntry();
+          h->SetObjectEntry( entry );
         }
-        const char * entry = w->GetMainShapeEntry();
-        h->SetObjectEntry( entry );
       }
     }
   }
index 48f4bc8cec432cdb22a25b2e156ab62765b8826d..49e49e82a4950ab672cbb4f42454c098cb4adb5e 100644 (file)
@@ -77,6 +77,8 @@ public:
 
   void                           showPreview ( bool );
 
+  int                            GetListSize() { return myListOfIDs.size(); }
+
   void SetMaxSize(int aMaxSize) { myMaxSize = aMaxSize; }
   void SetSubShType(TopAbs_ShapeEnum aSubShType) { mySubShType = aSubShType; }