Clone stamp anchor cursor does not appear after changing brush width

Bug #1080302 reported by Don McComb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Low
Don McComb

Bug Description

1) Select Clone Stamp tool.
2) Place cursor over image and hold Control key. Note that the cursor changes to an anchor icon.
3) Go to the tool bar and change the brush width (or even just click it and don't change the brush width).
4) Place cursor over image and hold Control key. Problem: the cursor no longer changes to an anchor icon.

Found in latest code in Linux Mint 13.

Tags: easy-to-fix
Don McComb (don-mccomb)
tags: added: easy-to-fix
Revision history for this message
Cameron White (cameronwhite91) wrote :

I'm guessing that clicking on the toolbar causes it to grab focus, and then the clone stamp tool never sees the keyboard events.

Changed in pinta:
importance: Undecided → Low
milestone: none → 1.5
status: New → Confirmed
Don McComb (don-mccomb)
Changed in pinta:
assignee: nobody → Don McComb (don-mccomb)
status: Confirmed → In Progress
Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
status: In Progress → Fix Committed
Revision history for this message
Don McComb (don-mccomb) wrote :

This bug is not completely fixed unfortunately. In my last commit, I set focus back to the canvas on the BrushWidth.ComboBox Changed event. However, if the user drops down the combo box and selects the same previous brush width, the Changed event is not triggered and the combobox maintains focus, so the cursor does not change to the anchor cursor when the Control key is pressed while the mouse is over the canvas.

I considered using the MouseMove event in the CloneStamp tool to set the cursor instead of the KeyPress event, but then I considered that the mouse may not not be moving when the Control key is pressed.

My last commit was a bit of a band-aid solution. I am considering a solution which has broader effect. I am considering the following:
Handle the KeyPress event in the MainWindow class. If the Mouse is over the canvas, then call PintaCanvas::DoKeyPress, which would then call BaseTool::DoKeyPress. If the key press event is handled by the canvas/tool, it will indicate so by setting e.RetVal. If MainWindow discovers that the Canvas did not handle the event, then the event can be passed onto the Widget which has focus (e.g., the toolbar).
Do you think this is the best way to solve it?

Changed in pinta:
status: Fix Committed → In Progress
Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
status: In Progress → Fix Committed
Changed in pinta:
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.