[PD-cvs] pd/src desire.tk,1.1.2.600.2.245,1.1.2.600.2.246

chunlee chunlee at users.sourceforge.net
Fri Jul 20 02:50:14 CEST 2007


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

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
wire-object-wire remove from path and delete from path


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.245
retrieving revision 1.1.2.600.2.246
diff -C2 -d -r1.1.2.600.2.245 -r1.1.2.600.2.246
*** desire.tk	20 Jul 2007 00:47:33 -0000	1.1.2.600.2.245
--- desire.tk	20 Jul 2007 00:50:10 -0000	1.1.2.600.2.246
***************
*** 2584,2587 ****
--- 2584,2588 ----
  def Canvas del {i} {
  	set o [lindex $@children $i]
+ 	#this keynav should be better sorted out
  	if {$o == $@keynav_current || $o == $@keynav_last_obj} {
  		set @keynav_current 0
***************
*** 2604,2608 ****
  	set new  [lwithout $wires $@wires]
  	set dead [lwithout $@wires $wires]
- 	#foreach x [lreverse $dead] {$x unsubscribe $self; $x erase} ;# should use delete instead?
  	set @wires $wires
  	$self changed wires
--- 2605,2608 ----
***************
*** 2616,2619 ****
--- 2616,2620 ----
  def Canvas delete_selection {} {
  	if {![llength $@selection] && ![llength $@selection_wire]} {return}
+ 	#this keynav should be better sorted out
  	if {$@keynav} {
  		set @keynav 0
***************
*** 3518,3522 ****
  	} else {
  		$id populate_menu $p {popup_properties popup_open popup_help
! 			popup_clear_wires popup_auto_wire popup_copy_id}
  	}
  	tk_popup $p [expr $x-5] [expr $y-5]
--- 3519,3523 ----
  	} else {
  		$id populate_menu $p {popup_properties popup_open popup_help
! 			popup_clear_wires popup_remove_from_path popup_delete_from_path popup_copy_id}
  	}
  	tk_popup $p [expr $x-5] [expr $y-5]
***************
*** 3593,3603 ****
  				}
  			}
- 			#$wire delete
  		}
  	}
  }
  
! def Canvas auto_wire {} {
! 	$self clear_wires
  	foreach obj1 $@auto_wire_obj1 {
  		set idx1 [$self children_idx $obj1]
--- 3594,3602 ----
  				}
  			}
  		}
  	}
  }
  
! def Canvas reconnect {} {
  	foreach obj1 $@auto_wire_obj1 {
  		set idx1 [$self children_idx $obj1]
***************
*** 3612,3615 ****
--- 3611,3625 ----
  }
  
+ def Canvas delete_obj_from_path {} {
+ 	$self clear_wires
+ 	$self reconnect
+ 	$self delete_selection
+ }
+ 
+ def Canvas remove_obj_from_path {} {
+ 	$self clear_wires
+ 	$self reconnect
+ }
+ 
  def Canvas wire_idx {connects} {
  	set wire ""; set idx 0
***************
*** 4006,4010 ****
  			}
  		}
! 		2 {if {![llength [$id wires2]]} {return}; $self auto_wire}
  	}
  }
--- 4016,4025 ----
  			}
  		}
! 		2 {
! 			if {![llength [$id wires2]]} {return}
! 			$self deselect_all
! 			$self selection+= $id
! 			$self auto_wire
! 		}
  	}
  }
***************
*** 5379,5383 ****
  def Box popup_properties {} {BoxPropertiesDialog new $self}
  def Box popup_clear_wires {} {[$self get_canvas] selection= $self; [$self get_canvas] clear_wires}
! def Box popup_auto_wire {}   {[$self get_canvas] selection= $self; [$self get_canvas] auto_wire}
  def BoxPropertiesDialog init {of} {
  	super $of
--- 5394,5399 ----
  def Box popup_properties {} {BoxPropertiesDialog new $self}
  def Box popup_clear_wires {} {[$self get_canvas] selection= $self; [$self get_canvas] clear_wires}
! def Box popup_remove_from_path {}   {[$self get_canvas] selection= $self; [$self get_canvas] remove_obj_from_path}
! def Box popup_delete_from_path {}   {[$self get_canvas] selection= $self; [$self get_canvas] delete_obj_from_path}
  def BoxPropertiesDialog init {of} {
  	super $of





More information about the Pd-cvs mailing list