Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23464
Modified Files: Tag: desiredata desire.tk Log Message: snap to grid also apply to ctrl+1
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.270 retrieving revision 1.1.2.600.2.271 diff -C2 -d -r1.1.2.600.2.270 -r1.1.2.600.2.271 *** desire.tk 3 Aug 2007 02:48:14 -0000 1.1.2.600.2.270 --- desire.tk 3 Aug 2007 08:55:25 -0000 1.1.2.600.2.271 *************** *** 1982,1996 **** }
- def Canvas new_objectxy {x y sel args} { - set @curpos [list $x $y] - $self new_object $sel $args - } - def Canvas new_object {sel args} { $self editmode= 1 $self deselect_all mset {x y} $@curpos ! set x1 [expr $x/$@zoom] ! set y1 [expr $y/$@zoom] switch -- $sel { obj { set goto [list $self new_object_edit]} --- 1982,1994 ---- }
def Canvas new_object {sel args} { $self editmode= 1 $self deselect_all mset {x y} $@curpos ! if {[$self look snap_grid]} { ! set grid [$self look grid_size] ! set x [expr floor($x/$grid)*$grid] ! set y [expr floor($y/$grid)*$grid] ! } switch -- $sel { obj { set goto [list $self new_object_edit]}