]> OCCT Git - occt-copy.git/commitdiff
0028954: corrected cube after porting on master
authoraba <aba@opencascade.com>
Tue, 6 Nov 2018 12:40:57 +0000 (15:40 +0300)
committeraba <aba@opencascade.com>
Tue, 6 Nov 2018 12:40:57 +0000 (15:40 +0300)
src/AIS/AIS_ViewCube.cxx
src/AIS/AIS_ViewCube.hxx

index fb6b907df070b6f6bce63815a8ea26602efd18c1..9af71f6f7fe571e219f5d56b40f6e65596f707f6 100644 (file)
@@ -952,11 +952,12 @@ void AIS_ViewCube::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMg
   // Display box
   aGroup = Prs3d_Root::NewGroup (thePrs);
   aGroup->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect());
+  Handle(Graphic3d_Group) aTextGroup = Prs3d_Root::NewGroup (thePrs);
   Standard_Integer anIt = 1;
   for (; anIt < SIDE_INDEX; anIt++)
   {
     Handle(Side) aPart = Handle(Side)::DownCast (myParts.ChangeFromIndex (anIt));
-    aPart->Display (thePrsMgr, aGroup, myDrawer->TextAspect());
+    aPart->Display (thePrsMgr, aGroup, aTextGroup, myDrawer->TextAspect());
     aPart->SetTransformPersistence (TransformPersistence());
   }
 
@@ -1591,8 +1592,9 @@ void AIS_ViewCube::ToolRectangle::FillArray (Handle(Graphic3d_ArrayOfTriangles)&
 //purpose  :
 //=======================================================================
 void AIS_ViewCube::Side::Display (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
-                                   const Handle(Graphic3d_Group)& theGroup,
-                                   const Handle(Prs3d_TextAspect)& theTextAspect)
+                                  const Handle(Graphic3d_Group)& theGroup,
+                                  const Handle(Graphic3d_Group)& theTextGroup,
+                                  const Handle(Prs3d_TextAspect)& theTextAspect)
 {
   Reset();
 
@@ -1654,7 +1656,7 @@ void AIS_ViewCube::Side::Display (const Handle(PrsMgr_PresentationManager)& theP
   aTool.FillArray (anArray, aTri);
   theGroup->AddPrimitiveArray (anArray);
 
-  Prs3d_Text::Draw (theGroup, theTextAspect, myText, aTextPosition);
+  Prs3d_Text::Draw (theTextGroup, theTextAspect, myText, aTextPosition);
 
   if (myHighlightPresentation.IsNull())
   {
index d8ccd82cb244c36df431633e55f220d5513198f4..b8be300d830c463f5b15ec61448044e3d65f1b8d 100644 (file)
@@ -672,6 +672,7 @@ protected: //! @name Auxilliary classes to fill presentation with proper primiti
     //! @param theTextAspect [in] text style.
     void Display (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
                   const Handle(Graphic3d_Group)& theGroup,
+                  const Handle(Graphic3d_Group)& theTextGroup,
                   const Handle(Prs3d_TextAspect)& theTextAspect);
 
   protected: