[PD-cvs] pd/src desire.tk,1.1.2.572,1.1.2.573

chunlee chunlee at users.sourceforge.net
Mon Nov 20 04:12:14 CET 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
couple of fixes


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.572
retrieving revision 1.1.2.573
diff -C2 -d -r1.1.2.572 -r1.1.2.573
*** desire.tk	20 Nov 2006 00:47:34 -0000	1.1.2.572
--- desire.tk	20 Nov 2006 03:12:11 -0000	1.1.2.573
***************
*** 1076,1080 ****
  	}
  	switch -- $suffix {
! 		all     {$c delete $self       }
  		default {$c delete $self$suffix}}
  }
--- 1076,1080 ----
  	}
  	switch -- $suffix {
! 		all     {$c delete $self}
  		default {$c delete $self$suffix}}
  }
***************
*** 2332,2336 ****
  	if {![llength $@selection] && ![llength $@selection_wire]} {return}
  	foreach obj $@selection {
! 	    foreach wire $_($obj:wires) {
  		set find [lsearch $@wires_pair $wire]
  		if {$find != -1} {
--- 2332,2336 ----
  	if {![llength $@selection] && ![llength $@selection_wire]} {return}
  	foreach obj $@selection {
! 	    foreach wire $_($obj:wires2) {
  		set find [lsearch $@wires_pair $wire]
  		if {$find != -1} {
***************
*** 3006,3037 ****
  	set @x2 $x
  	set @y2 $y
- 	#mset {type @to @inlet} $target ;# fix objective.tcl please...
- 	#mset [list type @to @inlet] $target
  	mset [list type foo bar] $target
- 	#switch $type {
- 	#outlet {mset [list type @from @outlet] $target}
- 	#inlet {mset [list type @to @inlet] $target}
- 	#}
- 	#puts "outlet::: $@outlet ||inlet::: $@inlet"
  	$self draw
  }
  def FutureWire unclick {x y f target} {
- 	#$self motion $x $y $f $target
  	mset [list type foo bar] $target
  	switch $type {
  		outlet {
  			mset [list type @from @outlet] $target
- 			set from_idx [$@canvas children_idx $@from]
- 			set to_idx [$@canvas children_idx $@to]
- 			$@canvas connect [list $from_idx $@outlet $to_idx $@inlet]
  		}
  		inlet {
  			mset [list type @to @inlet] $target
- 			set from_idx [$@canvas children_idx $@from]
- 			set to_idx [$@canvas children_idx $@to]
- 			$@canvas connect [list $from_idx $@outlet $to_idx $@inlet]
  		}
  		default {}
  	}
  	if {![shift? $f]} {$@canvas end_action}
  }
--- 3006,3028 ----
  	set @x2 $x
  	set @y2 $y
  	mset [list type foo bar] $target
  	$self draw
  }
  def FutureWire unclick {x y f target} {
  	mset [list type foo bar] $target
  	switch $type {
  		outlet {
  			mset [list type @from @outlet] $target
  		}
  		inlet {
  			mset [list type @to @inlet] $target
  		}
  		default {}
  	}
+ 	set from_idx [$@canvas children_idx $@from]
+ 	set to_idx [$@canvas children_idx $@to]
+ 	if {$from_idx >= 0 && $@from != $@to} {
+ 		$@canvas connect [list $from_idx $@outlet $to_idx $@inlet]
+ 	}
  	if {![shift? $f]} {$@canvas end_action}
  }
***************
*** 3114,3118 ****
  	set in_selection [expr [lsearch $@selection $id]>=0]
  	switch $type {
! 		outlet {set @action [FutureWire new $self $x $y $f $target]; return}
  		inlet {}
  		object {$self click_on_object $id $f}
--- 3105,3114 ----
  	set in_selection [expr [lsearch $@selection $id]>=0]
  	switch $type {
! 		outlet {
! 			if {$@action == "none"} {
! 				set @action [FutureWire new $self $x $y $f $target]
! 			}
! 			return
! 		}
  		inlet {}
  		object {$self click_on_object $id $f}
***************
*** 3930,3935 ****
  
  def Box delete_wire {wire} {
!   set find [lsearch $@wires $wire]
!   if {$find != -1} {set @wires [lreplace $@wires $find $find]}
  }
  
--- 3926,3931 ----
  
  def Box delete_wire {wire} {
!   set find [lsearch $@wires2 $wire]
!   if {$find != -1} {set @wires2 [lreplace $@wires2 $find $find]}
  }
  





More information about the Pd-cvs mailing list