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:
parent
e45399d347
commit
099d513011
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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}}]
|
||||
|
|
|
|||
Loading…
Reference in New Issue