From 49beadaac77f46be1c3bd948213c512df8b608c2 Mon Sep 17 00:00:00 2001 From: bourcier Date: Fri, 18 Oct 2013 15:14:05 +0000 Subject: [PATCH] Fix bug with PreCAD options as char not taken into account. Now, we can use SetPreCADOptionValue( 'tags', 'ignore' ) in TUI and in GUI. --- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index 50716f7..a142f94 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -168,8 +168,8 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G } i = 0; while (preCADcharOptionNames[i][0]) { - _preCADdoubleOptions.insert(preCADcharOptionNames[i]); - _preCADoption2value[preCADdoubleOptionNames[i++]].clear(); + _preCADcharOptions.insert(preCADcharOptionNames[i]); + _preCADoption2value[preCADcharOptionNames[i++]].clear(); } @@ -478,6 +478,8 @@ void BLSURFPlugin_Hypothesis::SetPreCADOptionValue(const std::string& optionName std::string typeName; if (i == 0) { // empty string + } else if (_preCADcharOptions.find(optionName) != _preCADcharOptions.end()) { + // do not check strings } else if (_preCADdoubleOptions.find(optionName) != _preCADdoubleOptions.end()) { // check if value is double char * endPtr; -- 2.39.2