anAsp->Aspect()->GetTextFontAspect(), (unsigned int)anAsp->Height(), aResolution))
{
isInit = Standard_True;
- const NCollection_String aText ((Standard_Utf16Char* )myText.ToExtString());
+ const NCollection_String aText (myText.ToExtString());
Font_Rect aBndBox = aFont.BoundingBox (aText, anAsp->HorizontalJustification(), anAsp->VerticalJustification());
Standard_Real aWidth = Abs (aBndBox.Width());
Standard_Real aHeight = Abs (aBndBox.Height());
aCenterOfLabel.ChangeCoord() -= myOrientation3D.XDirection().XYZ() * aWidth * 0.5;
}
- if (!anAsp->Aspect()->GetTextZoomable())
+ if (!anAsp->Aspect()->GetTextZoomable()
+ && (TransformPersistence().IsNull()
+ || TransformPersistence()->Mode() == Graphic3d_TMF_ZoomPers))
{
anAsp->Aspect()->SetTextZoomable (Standard_True);
- SetTransformPersistence (GetTransformPersistenceMode() | Graphic3d_TMF_ZoomPers, aPosition);
+ SetTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_ZoomPers, aPosition));
aPosition = gp::Origin();
}