Comment 6 for bug 168397

Revision history for this message
Tom Davidson (tjd-mit) wrote : Re: Font size spinbutton bug in Text toolbar

No, it's still very broken (in latest svn rev 16978). Note you don't have to do anything tricky to reveal this bug, but the following steps may be helpful in isolating the problem:

1: create a really big text box containing 2 short words, like 'CAT DOG'
2: make sure that the box is big enough: select all and set the size to 500px using the font and text dialog (Ctrl-Shift-T). Okay, now set it back to 48px and close the text dialog.
-->The fontsize in the flowRoot and the flowPara are both now 48 according to the XML editor
3: highlight the word 'CAT', and change its size to 64 using the *drop down menu* from the tool bar (no typing yet)
-->The fontsize in the flowRoot is still 48, and a new flowSpan with size 64 is created--OK
4: with 'CAT' still selected highlight the '64' in the spinbox with your mouse and type '2' (as if you wanted to change the font size to 24)
-->The fontsize for the flowSpan changes to 248. I.e. the fontsize from the *flowroot* element, prepended with the digit you just typed.; the spinbox correctly shows '248'

It seems like after the '64' is deleted, but before the '2' can be recognized, Inkscape is replacing the value with the default value of '48' from the flowroot, and putting the cursor at the beginning of the field.

This is bad enough, but unfortunately it's compounded by another problem: if your textbox is not big enough to show a (for example) 248px font, then the font size is still changed to 248, but the spinbox text just updates to '48' with the cursor placed between the 4 and the 8. In addition, whatever text you have selected in the text box is deselected. This means that the next digit you type (say '4', in our example) now tries to set the font size to '428' and it applies to all the text (both 'CAT' and 'DOG', in our example), since we've lost the selection. Phew!

I'm not sure what the best solution is. Probably waiting for an 'enter', or for the box to otherwise lose focus, would go a long way towards this, since the problem seem to essentially be overzealous updating.

I found and labeled a few dupes of this bug--I think it's really visible, and seems to really confuse people... I'm sorry that I'm not in a position to fix it, but I think it's a good candidate for milestoning.