0027957: Visualization, AIS_InteractiveContext - protect from displaying the same...
[occt.git] / src / AIS / AIS_InteractiveContext_3.cxx
index 80fcd2a..e01b842 100644 (file)
@@ -51,9 +51,7 @@ void AIS_InteractiveContext::SetPolygonOffsets(
   if ( anObj.IsNull() )
     return;
 
-  if( !anObj->HasInteractiveContext() )
-    anObj->SetContext( this );
-
+  setContextToObject (anObj);
   anObj->SetPolygonOffsets( aMode, aFactor, aUnits );
 
   if ( updateviewer ) {