opacity in selected style loses focus on kbd value scroll

Bug #167781 reported by Bug Importer
0
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
John Smith

Bug Description

When the focus is set to the opacity edit spinner at
the bottom of the screen, holding key up/down changes
the value in the spinner by 0.01 and the focus abruptly
changes focus to the artwork and typicially begins
moving itup/down. Holding key up/down in the edit
should spin the value in the edit until it reaches the
min/ma value and the focus should stay in the edit
until the user clicks elsewhere or presses tab.

<email address hidden>

Tags: linux ui
Revision history for this message
Bryce Harrington (bryce) wrote :

Confirmed on Ubuntu Linux with Inkscape SVN head. Draw and object. Select it. Click on text of O: and hold down arrow up or down key. Opacity will change one step, then suddenly the object will begin moving.

Changed in inkscape:
status: New → Triaged
Revision history for this message
Tony Baker (frd91gt) wrote :

Solution that I found is in ui/widget/selected-style.cpp on or around line 1150 (SVN revision 18485) to remove the defocus for the opacity spin box and it fixes the problem listed in the bug report.

In the comment above this code it says that there is a fix there for display interruptibility and the value-changed event being fired off repeatedly and causing the spin box to runaway in it's spinning till it hits 1.0 or 0.0.

I was unable to make this box uncontrollably scroll with my fix in place and was able to press and/or hold the up and down arrow keys to change the opacity without moving the object.

Attached is the diff on ui/widget/selected-style.cpp

Tony Baker (frd91gt)
Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
sas (sas-sas) wrote :

Tony Baker's patch works for me on Windows XP. Assigning to bbyak (who is listed as the author of src/ui/widget/selected-style.cpp).

Changed in inkscape:
assignee: nobody → buliabyak
Revision history for this message
bbyak (buliabyak) wrote :

That defocus call is there for a reason. When I change the value by clicking the scroll buttons on the value, without the defocus it will grab focus and I will have to click on canvas to move focus out of it. With it, I can scroll the value without canvas losing the focus. I consider this problem to be at least as important as the one you're trying to solve. So, please try to find a solution which would fix your problem without un-fixing mine.

Revision history for this message
ScislaC (scislac) wrote :

This is not currently in progress, changed to confirmed. Removed assignment of bbyak as he has been inactive with the project for a while. Will see if John Smith can come up with an elegant fix.

Changed in inkscape:
status: In Progress → Confirmed
assignee: bbyak (buliabyak) → nobody
Revision history for this message
John Smith (john-smithi) wrote :

Fix committed to trunk as r11534.
Opacity should now be consistent with other controls (such as zoom) - keys up/down/PgUp/PgDn keep focus, but mouse clicking the spin buttons returns focus to the canvas.

Changed in inkscape:
assignee: nobody → John Smith (john-smithi)
status: Confirmed → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

> (…) keys up/down/PgUp/PgDn keep focus, but mouse clicking the spin
> buttons returns focus to the canvas.

The changes in r11534 trigger a crash when trying to return the focus to the canvas by pressing <esc> while the focus is in the spinbox edit entry (not reproduced with r11533).

Note: AFAICT <esc> actually tries to 'cancel' the input. Pressing <return> OTOH does store the value and return the focus back to the canvas, without crash.

Revision history for this message
John Smith (john-smithi) wrote :

>crash when trying to return the focus to the canvas by pressing <esc>
Thanks for finding that ~suv, should be fixed by commit r11540.

> <esc> actually tries to 'cancel' the input
Yes, Esc tries to "Undo" the changes and return to the original value - should work in the Opacity spin now too.

Kris (kris-degussem)
Changed in inkscape:
milestone: none → 0.49
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.