When scaling text, first round the scaling factor...

... to the nearest 2 decimal places. This fixes a bug where upon loading
a text item, it could be scaled by e.g 0.999999, which would eventually
round down the point size by 1pt. Making the text item shrink by 1pt
every time the document was opened.
preferencesAboutTextFull
Craig Watson 8 years ago
parent c3c7a9030c
commit 86e2bf93cf
  1. 3
      src/domain/UBGraphicsTextItemDelegate.cpp

@ -532,6 +532,9 @@ bool UBGraphicsTextItemDelegate::keyReleaseEvent(QKeyEvent *event)
void UBGraphicsTextItemDelegate::ChangeTextSize(qreal factor, textChangeMode changeMode)
{
// round it to the nearest hundredth
factor = floor(factor*100+0.5)/100.;
if (scaleSize == changeMode)
{
if (1 == factor)

Loading…
Cancel
Save