]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
more correct display/erase of trihedron
authorasl <asl@opencascade.com>
Mon, 3 Apr 2006 10:16:17 +0000 (10:16 +0000)
committerasl <asl@opencascade.com>
Mon, 3 Apr 2006 10:16:17 +0000 (10:16 +0000)
src/OCCViewer/OCCViewer_ViewModel.cxx

index 216c9ec845c0507f548621c4f58f98f1e1da2109..d5e802d7b09f776a52c67f5ee93f3a2e32209a44 100755 (executable)
@@ -36,6 +36,8 @@
 #include <AIS_Drawer.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 
+#include <SelectMgr_SelectionManager.hxx>
+
 #include <Geom_Axis2Placement.hxx>
 #include <Prs3d_DatumAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
@@ -83,8 +85,8 @@ myBgColor( Qt::black )
         daspect->ThirdAxisAspect()->SetColor(Quantity_Color(0.0, 0.0, 1.0, Quantity_TOC_RGB));
     }
 
-    myAISContext->Display(myTrihedron);
-    myAISContext->Deactivate(myTrihedron);
+    myTrihedron->SetSelectionMode( -1 );
+    myAISContext->Display( myTrihedron, 0, -1 );
   }
 
   // selection
@@ -458,9 +460,18 @@ void OCCViewer_Viewer::setTrihedronShown( const bool on )
     return;
 
   if ( on )
-    myAISContext->Display( myTrihedron );
+  {
+    myTrihedron->SetToUpdate();
+    myAISContext->Display( myTrihedron, 0, -1, false );
+    myAISContext->KeepTemporary( myTrihedron );
+  }
   else
-    myAISContext->Erase( myTrihedron );
+  {
+    myAISContext->Erase( myTrihedron, false, false );
+    myAISContext->Remove( myTrihedron );
+    myAISContext->SelectionManager()->Remove( myTrihedron );
+  }
+  myAISContext->UpdateCurrentViewer();
 }
 
 int OCCViewer_Viewer::trihedronSize() const