From 78a8dfb9f85ea4e00907431492225f7d0ae8d537 Mon Sep 17 00:00:00 2001 From: vro Date: Mon, 15 Oct 2018 15:07:52 +0300 Subject: [PATCH] 0030215: Application Framework, TPrsStd_AISPresentation - Enable Lazy Presentation Updates --- src/TPrsStd/TPrsStd_AISPresentation.cxx | 4 ++-- tests/bugs/caf/bug30215 | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/caf/bug30215 diff --git a/src/TPrsStd/TPrsStd_AISPresentation.cxx b/src/TPrsStd/TPrsStd_AISPresentation.cxx index e67391a013..75ba33bd20 100644 --- a/src/TPrsStd/TPrsStd_AISPresentation.cxx +++ b/src/TPrsStd/TPrsStd_AISPresentation.cxx @@ -943,7 +943,7 @@ void TPrsStd_AISPresentation::AISErase(const Standard_Boolean theIsRemove) if ( !anOwnContext.IsNull() && anOwnContext != aContext ) anOwnContext->Remove(myAIS, Standard_False); - myAIS->SetToUpdate(); + myAIS.Nullify(); } else { @@ -960,7 +960,7 @@ void TPrsStd_AISPresentation::AISErase(const Standard_Boolean theIsRemove) if ( !anOwnContext.IsNull() ) { anOwnContext->Remove(myAIS, Standard_False); - myAIS->SetToUpdate(); + myAIS.Nullify(); } } else diff --git a/tests/bugs/caf/bug30215 b/tests/bugs/caf/bug30215 new file mode 100644 index 0000000000..dac51e16f8 --- /dev/null +++ b/tests/bugs/caf/bug30215 @@ -0,0 +1,20 @@ +puts "=========" +puts "OCC30215" +puts "=========" +puts "" +###################################################################################### +# Application Framework, TPrsStd_AISPresentation - Enable Lazy Presentation Updates +###################################################################################### + +NewDocument D +AISInitViewer D +box b1 100 100 100 +SetShape D 0:1 b1 +AISSet D 0:1 NS +AISDisplay D 0:1 0 +box b2 100 200 300 +SetShape D 0:1 b2 +AISRemove D 0:1 +AISDisplay D 0:1 0 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png