From: asl Date: Mon, 3 Apr 2006 10:16:17 +0000 (+0000) Subject: more correct display/erase of trihedron X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=266ec6ddfd272ff73bc596d01020c2bb7b1b7246;p=modules%2Fgui.git more correct display/erase of trihedron --- diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 216c9ec84..d5e802d7b 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -36,6 +36,8 @@ #include #include +#include + #include #include #include @@ -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