Corrected the "Pick" button action in the "Library Manager" window;

this had two issues:  (1) "getcell" was not being called with
"child 0 0", leading to child cells that are not placed where
expected in relation to a grid snap setting;  and (2) "cursor"
was assuming internal units and needed that to be explicitly
stated using "cursor internal".
This commit is contained in:
R. Timothy Edwards 2026-05-24 16:23:18 -04:00
parent e45399d347
commit 099d513011
3 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
8.3.648
8.3.649

View File

@ -35,10 +35,10 @@ proc magic::libcallback {command} {
switch $command {
load {$winname load $celldef}
place {$winname getcell $celldef}
place {$winname getcell $celldef child 0 0}
pick {
magic::tool pick
$winname getcell $celldef
$winname getcell $celldef child 0 0
magic::startselect $winname pick
}
}

View File

@ -651,9 +651,9 @@ proc magic::startselect {window {option {}}} {
select nocycle
}
}
set Opts(origin) [cursor]
set Opts(origin) [cursor internal]
set Opts(motion) [bind ${window} <Motion>]
bind ${window} <Motion> [subst {$Opts(motion); set p \[cursor\]; \
bind ${window} <Motion> [subst {$Opts(motion); set p \[cursor internal\]; \
set x \[expr {\[lindex \$p 0\] - [lindex $Opts(origin) 0]}\]i; \
set y \[expr {\[lindex \$p 1\] - [lindex $Opts(origin) 1]}\]i; \
*bypass select move \${x} \${y}}]