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 );
ok = ( w && w->IsOk() );
}
else if ( hypType() == "QuadrangleParams" )
{
StdMeshersGUI_SubShapeSelectorWdg* w =
widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
ok = ( w->GetListSize() > 0 );
}
return ok;
}
@ -604,14 +610,14 @@ 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 );
}
}
}
}
return valueStr;
}

View 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; }