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