]> OCCT Git - occt-copy.git/commitdiff
Compilation correction for patch: "#265 Possibility to display materials by different...
authornds <nds@opencascade.com>
Thu, 8 Nov 2018 10:05:54 +0000 (13:05 +0300)
committernds <nds@opencascade.com>
Thu, 8 Nov 2018 10:05:54 +0000 (13:05 +0300)
src/AIS/AIS_InteractiveObject.cxx
src/OpenGl/OpenGl_Group.cxx

index 3600b099937ef97fb6c3e9110b809c28e0080ec2..660a820f6aa110150b36b1a9e10ac1a4e7b3e62f 100644 (file)
@@ -649,10 +649,10 @@ void AIS_InteractiveObject::SynchronizeAspects()
     {
       if (!aGroupIter.Value().IsNull())
       {
-        Handle(Graphic3d_AspectFillCapping) aCappingAspect = aGrp->FillCappingAspect();
+        Handle(Graphic3d_AspectFillCapping) aCappingAspect = aGroupIter.Value()->FillCappingAspect();
           if (!aCappingAspect.IsNull())
           {
-            aGrp->SetGroupPrimitivesAspect (aCappingAspect);
+            aGroupIter.Value()->SetGroupPrimitivesAspect (aCappingAspect);
           }
         aGroupIter.ChangeValue()->SynchronizeAspects();
       }
index 8f468d153986f88a458cbf6c01f1d628c7d6e5a3..a4de0f6e746aa60b7ea1ec0f0d42a124be1423db 100644 (file)
@@ -293,6 +293,29 @@ void OpenGl_Group::SynchronizeAspects()
   }
 }
 
+// =======================================================================
+// function : SetGroupPrimitivesAspect
+// purpose  :
+// =======================================================================
+void OpenGl_Group::SetGroupPrimitivesAspect (const Handle(Graphic3d_AspectFillCapping)& theAspect)
+{
+  if (IsDeleted())
+  {
+    return;
+  }
+
+  if (myAspectFillCapping == NULL)
+  {
+    myAspectFillCapping = new OpenGl_CappingPlaneResource (theAspect);
+  }
+  else
+  {
+    myAspectFillCapping->SetAspect (theAspect);
+  }
+  Update();
+}
+
+
 // =======================================================================
 // function : AddPrimitiveArray
 // purpose  :