Salome HOME
22470: EDF 2824 HEXOTICPLUGIN: Working directory is not taking into account with...
authoreap <eap@opencascade.com>
Fri, 31 Jan 2014 14:45:37 +0000 (14:45 +0000)
committereap <eap@opencascade.com>
Fri, 31 Jan 2014 14:45:37 +0000 (14:45 +0000)
Add a trailing slash

src/HexoticPlugin/HexoticPlugin_Hypothesis.cxx

index 7a0c94c741cabd76af384750a44f1d84d0fdf867..43ea38ee3d5c5a1e44d20be13930c2100785848e 100644 (file)
@@ -76,14 +76,14 @@ void HexoticPlugin_Hypothesis::SetHexesMaxLevel(int theVal) {
 
 void HexoticPlugin_Hypothesis::SetMinSize(double theVal) {
   if (theVal != _minSize) {
-         _minSize = theVal;
+          _minSize = theVal;
     NotifySubMeshesHypothesisModification();
   }
 }
 
 void HexoticPlugin_Hypothesis::SetMaxSize(double theVal) {
   if (theVal != _maxSize) {
-         _maxSize = theVal;
+          _maxSize = theVal;
     NotifySubMeshesHypothesisModification();
   }
 }
@@ -120,6 +120,16 @@ void HexoticPlugin_Hypothesis::SetHexoticWorkingDirectory(const std::string& pat
 {
   if ( _hexoticWorkingDirectory != path ) {
     _hexoticWorkingDirectory = path;
+    if ( !path.empty() )
+    {
+#ifdef WIN32
+      if( path[ path.size()-1 ] != '\\')
+        _hexoticWorkingDirectory += '\\';
+#else
+      if( path[ path.size()-1 ] != '/')
+        _hexoticWorkingDirectory += '/';
+#endif
+    }
     NotifySubMeshesHypothesisModification();
   }
 }