]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To customize popup actions
authorapo <apo@opencascade.com>
Wed, 7 Sep 2005 11:49:54 +0000 (11:49 +0000)
committerapo <apo@opencascade.com>
Wed, 7 Sep 2005 11:49:54 +0000 (11:49 +0000)
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_Module.h

index 5631b2de58664b1c09f7b1cdcb82966c4fac1256..065c23b2f8b82aa37be998267577df224636d20b 100644 (file)
@@ -484,8 +484,8 @@ VisuGUI_Module
 
 //---------------------------------------------------------------
 void
-VisuGUI_Module::
-OnEditGaussPoints()
+VisuGUI_Module
+::OnEditGaussPoints()
 {
   Handle(SALOME_InteractiveObject) anIO;
   if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
@@ -499,8 +499,8 @@ OnEditGaussPoints()
 
 //---------------------------------------------------------------
 void
-VisuGUI_Module::
-OnDisplayPrs()
+VisuGUI_Module
+::OnDisplayPrs()
 {
   if(MYDEBUG) MESSAGE("VisuGUI_Module::OnDisplayPrs");
 
@@ -571,8 +571,35 @@ VisuGUI_Module
 
 //---------------------------------------------------------------
 void
-VisuGUI_Module::
-OnErasePrs()
+VisuGUI_Module
+::OnDisplayOnlyPrs()
+{
+  if(SalomeApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this)){
+    SALOME_ListIO aList;
+    aSelectionMgr->selectedObjects(aList);
+    for(SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next()){
+      Handle(SALOME_InteractiveObject) anIO = it.Value();
+      CORBA::Object_var anObject = GetSelectedObj( GetAppStudy(this), anIO->getEntry() );
+
+      if(!CORBA::is_nil(anObject)){
+       if(VISU::Prs3d_i* aPrs3d = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(anObject).in())){
+         if(aPrs3d->GetType() != VISU::TGAUSSPOINTS)
+           VISU::OnEraseAll<SVTK_Viewer>(this);
+         else
+           VISU::OnEraseAll<VVTK_Viewer>(this);
+         break;
+       }
+      }
+    }
+  }
+  OnDisplayPrs();
+}
+
+
+//---------------------------------------------------------------
+void
+VisuGUI_Module
+::OnErasePrs()
 {
   QApplication::setOverrideCursor(Qt::waitCursor);
 
index ee82152698d40aed8ecf5fcd4fa4e299a576281e..3bb7787fc09cc3663bc53f83a9688a3e766bd5bd 100644 (file)
@@ -109,6 +109,10 @@ protected slots:
   void
   OnDisplayPrs();
 
+  virtual 
+  void
+  OnDisplayOnlyPrs();
+
   virtual
   void
   OnEraseAll();