IPAL21387 Unknown Exception after OK in Quadrangle Parameters Hypothesis dialog box.

This commit is contained in:
dmv 2009-10-15 10:47:52 +00:00
parent f314777950
commit f21bad4155
2 changed files with 12 additions and 4 deletions

View File

@ -384,6 +384,12 @@ bool StdMeshersGUI_StdHypothesisCreator::checkParams( QString& msg ) const
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 ); widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
ok = ( w && w->IsOk() ); ok = ( w && w->IsOk() );
} }
else if ( hypType() == "QuadrangleParams" )
{
StdMeshersGUI_SubShapeSelectorWdg* w =
widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
ok = ( w->GetListSize() > 0 );
}
return ok; return ok;
} }
@ -604,14 +610,14 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshersGUI_SubShapeSelectorWdg* w = StdMeshersGUI_SubShapeSelectorWdg* w =
widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 ); widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
if (w) { if (w) {
if( int id = w->GetListOfIDs()[0] ) { if( w->GetListSize() > 0 ) {
h->SetTriaVertex( id ); h->SetTriaVertex( w->GetListOfIDs()[0] ); // getlist must be called once
}
const char * entry = w->GetMainShapeEntry(); const char * entry = w->GetMainShapeEntry();
h->SetObjectEntry( entry ); h->SetObjectEntry( entry );
} }
} }
} }
}
return valueStr; return valueStr;
} }

View File

@ -77,6 +77,8 @@ public:
void showPreview ( bool ); void showPreview ( bool );
int GetListSize() { return myListOfIDs.size(); }
void SetMaxSize(int aMaxSize) { myMaxSize = aMaxSize; } void SetMaxSize(int aMaxSize) { myMaxSize = aMaxSize; }
void SetSubShType(TopAbs_ShapeEnum aSubShType) { mySubShType = aSubShType; } void SetSubShType(TopAbs_ShapeEnum aSubShType) { mySubShType = aSubShType; }