[PD-cvs] pd/src desire.tk,1.1.2.255,1.1.2.256

Mathieu Bouchard matju at users.sourceforge.net
Wed Jun 21 07:49:47 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4876

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
implemented Shift in moving the selection


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.255
retrieving revision 1.1.2.256
diff -C2 -d -r1.1.2.255 -r1.1.2.256
*** desire.tk	21 Jun 2006 05:44:14 -0000	1.1.2.255
--- desire.tk	21 Jun 2006 05:49:45 -0000	1.1.2.256
***************
*** 2356,2359 ****
--- 2356,2367 ----
  #-----------------------------------------------------------------------------------#
  
+ def* Canvas selection_move {dx dy} {
+     foreach item $@selection {
+ 	mset {x1 y1 x2 y2} [$item bbox]
+ 	pd .$self object_moveto !$item [expr $x1+$dx] [expr $y1+$dy]
+ 	$item draw_wires
+     }
+ }
+ 
  def* Canvas key {x y key iso shift} {
      set c .$self.c
***************
*** 2401,2446 ****
  	}
      }
!     
      switch $key {
!     	Up {
! 		if {$@selection != ""} {
! 		foreach item $@selection {
! 		mset {x1 y1 x2 y2} [$item bbox]
! 		pd .$self object_moveto !$item $x1 [expr $y1 - 1]
! 		$item draw_wires
! 		}
! 		}
! 	}
! 	Down {
! 		if {$@selection != ""} {
! 		foreach item $@selection {
! 		mset {x1 y1 x2 y2} [$item bbox]
! 		pd .$self object_moveto !$item $x1 [expr $y1 + 1]
! 		$item draw_wires
! 		}
! 		}
! 	}
! 	Left {
! 		if {$@selection != ""} {
! 		foreach item $@selection {
! 		mset {x1 y1 x2 y2} [$item bbox]
! 		pd .$self object_moveto !$item [expr $x1-1] $y1
! 		$item draw_wires
! 		}
! 		}
! 	}
! 	Right {
! 		if {$@selection != ""} {
! 		foreach item $@selection {
! 		mset {x1 y1 x2 y2} [$item bbox]
! 		pd .$self object_moveto !$item [expr $x1+1] $y1
! 		$item draw_wires
! 		}
! 		}
! 	}
  	default {}
      }
-     
-     
  }
  
--- 2409,2420 ----
  	}
      }
!     if {$shift} {set motion 10} {set motion 1}
      switch $key {
! 	Up    {$self selection_move 0 -$motion}
! 	Down  {$self selection_move 0 +$motion}
! 	Left  {$self selection_move -$motion 0}
! 	Right {$self selection_move +$motion 0}
  	default {}
      }
  }
  





More information about the Pd-cvs mailing list