From 266ec6ddfd272ff73bc596d01020c2bb7b1b7246 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 3 Apr 2006 10:16:17 +0000 Subject: [PATCH] more correct display/erase of trihedron --- src/OCCViewer/OCCViewer_ViewModel.cxx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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 -- 2.39.2