Salome HOME
0022765: [EDF] Improvement of local selection mechanism
[modules/geom.git] / src / AdvancedGUI / AdvancedGUI_SmoothingSurfaceDlg.cxx
index 89c5f68ce9ccf3934dfdd5524d6d5d493d170f36..2f276ef1e8577669eecb1a4e6b961cbf5bd83728 100644 (file)
@@ -119,6 +119,8 @@ void AdvancedGUI_SmoothingSurfaceDlg::Init()
 
   showOnlyPreviewControl();
 
+  globalSelection();
+  localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
   //@@ initialize dialog box widgets here @@//
 
   // Signal/slot connections
@@ -160,7 +162,8 @@ bool AdvancedGUI_SmoothingSurfaceDlg::ClickOnApply()
     return false;
 
   initName();
-
+  globalSelection();
+  localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
   return true;
 }
 
@@ -171,6 +174,8 @@ bool AdvancedGUI_SmoothingSurfaceDlg::ClickOnApply()
 void AdvancedGUI_SmoothingSurfaceDlg::ActivateThisDialog()
 {
   GEOMBase_Skeleton::ActivateThisDialog();
+  globalSelection();
+  localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
   //displayPreview();
 }
 
@@ -249,6 +254,16 @@ bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects)
   return res;
 }
 
+//=================================================================================
+// function : addSubshapesToStudy
+// purpose  : virtual method to add new SubObjects if local selection
+//=================================================================================
+void AdvancedGUI_SmoothingSurfaceDlg::addSubshapesToStudy()
+{
+  for ( int i = 0; i < myPoints.count(); i++ )
+    GEOMBase::PublishSubObject( myPoints[i].get() );
+}
+
 //=================================================================================
 // function : getNbPoints()
 // purpose  : Returns the number of points in myPoints list.
@@ -337,5 +352,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::SetEditCurrentArgument()
   if ( sender() == GroupPoints->PushButton1 )
     myEditCurrentArgument = GroupPoints->LineEdit1;
   myEditCurrentArgument->setFocus();
+  globalSelection();
+  localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
   SelectionIntoArgument();
 }