Salome HOME
Merge branch 'V7_7_BR' into hydro/imps_2015
[modules/geom.git] / src / GenerationGUI / GenerationGUI_ThicknessDlg.cxx
index f743fa63151979dc40d8683a689bbf93309c5dd8..3c6bd003e9ff0aed6068aece53580ea29cc94de6 100644 (file)
@@ -421,6 +421,7 @@ bool GenerationGUI_ThicknessDlg::execute (ObjectList& objects)
   GEOM::GEOM_I3DPrimOperations_var anOper       =
     GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
   double                           aThickness   = myThicknessSpin->value();
+  bool                             anInside = myInsideCheck->isChecked();
   GEOM::ListOfLong_var             anObjIDsList = new GEOM::ListOfLong();
   TopoDS_Shape                     aShape;
 
@@ -452,16 +453,28 @@ bool GenerationGUI_ThicknessDlg::execute (ObjectList& objects)
     }
   }
 
-  if (myInsideCheck->isChecked()) {
-    aThickness = -aThickness;  
-  }
-
   anObj = anOper->MakeThickening
-    (myObject.get(), anObjIDsList.in(), aThickness, true);
+    (myObject.get(), anObjIDsList.in(), aThickness, true, anInside);
     
   if (!anObj->_is_nil()) {
+    if (!IsPreview()) {
+      QStringList aParameters;
+      aParameters << myThicknessSpin->text();
+      anObj->SetParameters(aParameters.join(":").toUtf8().constData());
+    }
     objects.push_back(anObj._retn());
   }
 
   return true;
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> GenerationGUI_ThicknessDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res(myFaces);
+  res << myObject;
+  return res;
+}