[PD-cvs] pd/src desire.tk,1.1.2.534,1.1.2.535

chunlee chunlee at users.sourceforge.net
Mon Oct 30 01:04:03 CET 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
fixes to $@selection update


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.534
retrieving revision 1.1.2.535
diff -C2 -d -r1.1.2.534 -r1.1.2.535
*** desire.tk	29 Oct 2006 20:31:33 -0000	1.1.2.534
--- desire.tk	30 Oct 2006 00:03:59 -0000	1.1.2.535
***************
*** 1022,1026 ****
  	set zoom [$canvas zoom]
  	set coords [lmap * $coords $zoom]
- 	#puts "coords::$coords"
  	set find [lsearch $args "-width"]
  	if {$find >= 0} {
--- 1022,1025 ----
***************
*** 2977,2981 ****
  	if {$f&8} {$self right_click $id $x $y; return}
  	if {!$@editmode} {$self run_click $id $x $y $f $target; return}
! 	if {[llength $@obj_in_edit]} {$@obj_in_edit unedit; set @obj_in_edit {}}
  	set in_selection [expr [lsearch $@selection $id]>=0]
  	switch $type {
--- 2976,2980 ----
  	if {$f&8} {$self right_click $id $x $y; return}
  	if {!$@editmode} {$self run_click $id $x $y $f $target; return}
! 	#if {[llength $@obj_in_edit]} {$@obj_in_edit unedit; set @obj_in_edit {}}
  	set in_selection [expr [lsearch $@selection $id]>=0]
  	switch $type {
***************
*** 3003,3008 ****
  
  def Canvas click_on_object {id f} {
- 	$self selection+= $id; set @action edit
  	switch [expr $f&255] {
  		2 {if {![llength [$id wires]]} {return}; $self auto_wire}
  	}
--- 3002,3019 ----
  
  def Canvas click_on_object {id f} {
  	switch [expr $f&255] {
+ 		0 {
+ 			if {[llength $@obj_in_edit]} {$@obj_in_edit unedit; set @obj_in_edit {}}
+ 			$self deselect_all
+ 			$self selection+= $id
+ 			set @action edit
+ 		}
+ 		1 {
+ 			if {[lsearch $@selection $id] < 0} {
+ 				$self selection+= $id
+ 			} else {
+ 				$self selection-= $id
+ 			}
+ 		}
  		2 {if {![llength [$id wires]]} {return}; $self auto_wire}
  	}
***************
*** 3043,3046 ****
--- 3054,3058 ----
  	$self deselect_all
  	$self click_deselect_io
+ 	if {[llength $@obj_in_edit]} {$@obj_in_edit unedit; set @obj_in_edit {}}
  	switch $@action {
  		edit {}
***************
*** 3544,3548 ****
  		Return {
  			if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} {
! 				if {$_($@selection:_class) == "ObjectBox"} {$@selection edit; $self dehilite_io}
  			} else {
  				puts "    iosel_i ---> $@keynav_iosel_i"
--- 3556,3565 ----
  		Return {
  			if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} {
! 				if {[llength $@selection] == 1} {
! 					if {[$@selection class] == "ObjectBox"} {
! 						$@selection edit
! 						$self dehilite_io
! 					}
! 				}
  			} else {
  				puts "    iosel_i ---> $@keynav_iosel_i"
***************
*** 4475,4478 ****
--- 4492,4496 ----
  			$@canvas focus= ""
  			pd .$self set [$self canonize $@val]
+ 			pd .$self bang
  			set @text $@val
  			set @clicking 0
***************
*** 4726,4730 ****
  		#catch {set @val [expr $@buf]}
  		$@canvas focus= ""
! 		set @old_val $val
  		pd .$self float $@val
  		pd .$self bang
--- 4744,4748 ----
  		#catch {set @val [expr $@buf]}
  		$@canvas focus= ""
! 		set @old_val $@val
  		pd .$self float $@val
  		pd .$self bang





More information about the Pd-cvs mailing list