From 08e10b041a9c8532dab2a23ed3f59e2930d04d7d Mon Sep 17 00:00:00 2001 From: gdd Date: Mon, 10 Oct 2011 14:03:46 +0000 Subject: [PATCH] rnc : fixed a crash in BLSURFPlugin --- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index c50cf63..959d890 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -578,8 +578,8 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const catch ( const SALOME::SALOME_Exception& ex ) { SUIT_MessageBox::critical( dlg(), - tr("SMESH_ERROR"), - ex.details.text.in() ); + tr("SMESH_ERROR"), + ex.details.text.in() ); ok = false; } } @@ -599,17 +599,25 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const // int row = 0, nbRows = mySizeMapTable->rowCount(); int row = 0, nbRows = mySizeMapTable->topLevelItemCount(); + std::string e, s; for ( ; row < nbRows; ++row ) { QString entry = mySizeMapTable->topLevelItem( row )->data(SMP_ENTRY_COLUMN, Qt::EditRole).toString(); QString sizeMap = mySizeMapTable->topLevelItem( row )->data(SMP_SIZEMAP_COLUMN, Qt::EditRole).toString(); + MESSAGE("entry ="<sizeMapValidationFromRow(row)) { try { - const char* e = entry.toLatin1().constData(); - const char* s = that->mySMPMap[entry].toLatin1().constData(); - h->SetSizeMapEntry( e, s ); + MESSAGE("entry ="<mySMPShapeTypeMap[entry] == TopAbs_VERTEX) fullSizeMap = QString("def f(): return ") + sizeMap; - // MESSAGE("SetSizeMapEntry("<mySMPShapeTypeMap.contains(entry)) + MESSAGE("no such entry in mySMPShapeTypeMap") return; if (that->mySMPMap.contains(entry)) if (that->mySMPMap[entry] == sizeMap @@ -2746,7 +2755,8 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromRow(int myRow, bool bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEntry, bool displayError) { -// MESSAGE("BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry()"); + MESSAGE("BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry()"); + MESSAGE("myEntry = "<