+ HexoticPlugin::HexoticPlugin_Hypothesis_var h =
+ HexoticPlugin::HexoticPlugin_Hypothesis::_narrow( hypothesis() );
+
+ myAdvWidget->myOptionTable->setFocus();
+ QApplication::instance()->processEvents();
+
+ QString name, value;
+ bool isDefault, ok = true;
+ int iRow = 0, nbRows = myAdvWidget->myOptionTable->topLevelItemCount();
+ for ( ; iRow < nbRows; ++iRow )
+ {
+ QTreeWidgetItem* row = myAdvWidget->myOptionTable->topLevelItem( iRow );
+ myAdvWidget->GetOptionAndValue( row, name, value, isDefault );
+
+ if ( name.simplified().isEmpty() )
+ continue; // invalid custom option
+
+ if ( isDefault ) // not selected option
+ value.clear();
+
+ try {
+ h->SetOptionValue( name.toLatin1().constData(), value.toLatin1().constData() );
+ }
+ catch ( const SALOME::SALOME_Exception& ex )
+ {
+ msg = ex.details.text.in();
+ ok = false;
+ break;
+ }
+ }
+
+ if ( !ok )
+ {
+ h->SetOptionValues( myOptions ); // restore values
+ return false;
+ }
+