Commit 86e2bf93 authored by Craig Watson's avatar Craig Watson

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.
parent c3c7a903
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment