Fix with checking flags UBGraphicsTextItem using bit and instead of case condition