| Ticket UUID: | def37f133ee3ea326782f526031dde9b50535707 | |||
| Title: | crosshair not hidden when mouse leaves the canvas | |||
| Type: | Bug | Version: | 1.2 | |
| Submitter: | anonymous | Created on: | 2022-12-14 14:31:22 | |
| Subsystem: | tklib :: crosshair | Assigned To: | aku | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2022-12-15 19:09:37 | |
| Resolution: | Fixed | Closed By: | aku | |
| Closed on: | 2022-12-15 19:09:37 | |||
| Description: |
File crosshair.tcl, in the function "::crosshair::Unhide" , line 6:
"set opts(hidden) 0"
is only defined as local variable, so has no effect to hide the crosshair when the mouse leaves the canvas. The crosshair is still displayed. It occurs from the second time the cursor leaves the canvas, so maybe it's why it was missed during tests.
I propose the following correction (add 2 lines after line 6):
# Store changes back.
set config($w) [array get opts]
full function:
proc ::crosshair::Unhide { w x y } {
variable config
if { ![info exists config($w)] } return
array set opts $config($w)
# Already unhidden, do nothing
if { !$opts(hidden) } return
set opts(hidden) 0
# Store changes back.
set config($w) [array get opts]
# Recreate cross-hair. This takes the bounding boxes, if any, into
# account, i.e. if we are out of bounds nothing will appear.
Move $w $x $y
return
}
so the config array is updated, the crosshair is hidden when the mouse cursor leaves the canvas.
| |||
| User Comments: |
aku added on 2022-12-15 19:09:37:
Fix applied with commit [f749f0c077]. Note, fix was done on branch [canvas-edit-and-map] providing more updates for the `canvas::edit::*` packages, and adding new `map::*` packages. Fix integrated into trunk with commit [76668aeace]. aku added on 2022-12-15 18:58:29: Fully agreed with the report and the proposed fix. Thank you for reporting. | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki