From: eap Date: Tue, 10 Jan 2012 14:12:53 +0000 (+0000) Subject: 0021439: EDF 2004 GEOM, SMESH: Dump of study gives bad geom group and stops with... X-Git-Tag: V6_5_0a1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b035d22554a55a9669d94b4ec7fed4eeace2260d;p=plugins%2Fblsurfplugin.git 0021439: EDF 2004 GEOM, SMESH: Dump of study gives bad geom group and stops with NameError exception fix checkParams() to not to restore an old value if a new one is OK --- diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 959d890..5e6d4fc 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -554,14 +554,14 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const MESSAGE("BLSURFPluginGUI_HypothesisCreator::checkParams"); bool ok = true; + BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = + BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( hypothesis() ); + if ( ok ) { myOptionTable->setFocus(); QApplication::instance()->processEvents(); - BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = - BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis() ); - int row = 0, nbRows = myOptionTable->rowCount(); for ( ; row < nbRows; ++row ) { @@ -584,6 +584,9 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const } } } + } + if ( !ok ) + { h->SetOptionValues( myOptions ); // restore values h->SetPreCADOptionValues( myPreCADOptions ); // restore values } @@ -594,10 +597,6 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const mySizeMapTable->setFocus(); QApplication::instance()->processEvents(); - BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis() ); - BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; - -// int row = 0, nbRows = mySizeMapTable->rowCount(); int row = 0, nbRows = mySizeMapTable->topLevelItemCount(); std::string e, s; for ( ; row < nbRows; ++row ) @@ -2259,8 +2258,8 @@ void BLSURFPluginGUI_HypothesisCreator::onOptionChosenInPopup( QAction* a ) myOptionTable->item( row, OPTION_NAME_COLUMN )->setFlags( 0 ); myOptionTable->setItem( row, OPTION_VALUE_COLUMN, new QTableWidgetItem( "" ) ); myOptionTable->item( row, OPTION_VALUE_COLUMN )->setFlags( Qt::ItemIsSelectable | - Qt::ItemIsEditable | - Qt::ItemIsEnabled ); + Qt::ItemIsEditable | + Qt::ItemIsEnabled ); myOptionTable->resizeColumnToContents( OPTION_NAME_COLUMN ); } myOptionTable->clearSelection(); @@ -2351,7 +2350,7 @@ void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item, QString attEntry = that->myATTMap[entry]; CORBA::Object_var attObj = entryToObject(attEntry); myAttSizeSpin->setValue(phySize); - if (sizeMap.startsWith("Attractor")){ + if (sizeMap.startsWith("Attractor")){ myAttDistSpin->setValue(infDist); myAttractorCheck->setChecked(true); } @@ -2622,7 +2621,7 @@ void BLSURFPluginGUI_HypothesisCreator::insertElement(GEOM::GEOM_Object_var anOb if (that->mySMPMap.contains(shapeEntry)) { if (that->mySMPMap[shapeEntry] != "__TO_DELETE__") { // MESSAGE("Size map for shape with name(entry): "<< shapeName << "(" << entry << ")"); - return; + return; } } mySizeMapTable->addTopLevelItem(item);