Changeset 0ce076c in tol for tolbase/lib
- Timestamp:
- Mar 26, 2010, 10:41:45 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 38ac796
- Parents:
- 465c1d5
- File:
-
- 1 edited
-
tolbase/lib/toltk/tolinspe.tcl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/toltk/tolinspe.tcl
r465c1d5 r0ce076c 2125 2125 } 2126 2126 NameBlock { 2127 if { [ llength $options_selected(NameBlock) ] } { 2127 set sel_length [ llength $options_selected(NameBlock) ] 2128 if { $sel_length } { 2128 2129 set idx_current [ lsearch $vars_selected $node_act ] 2129 foreach mi [ TolGui_GetMenuEntries \ 2130 $options_selected(NameBlock) $idx_current ] { 2130 set all_nb_options \ 2131 [ TolGui_GetMenuEntries \ 2132 $options_selected(NameBlock) $idx_current ] 2133 set num_options [ llength $all_nb_options ] 2134 foreach mi $all_nb_options { 2131 2135 set _cname [ lindex $mi 0 ] 2132 2136 set cname [ string map [ list @ "" . _ ] $_cname ] … … 2136 2140 set mclass $data_menu(main).cls$cname 2137 2141 if { ![ winfo exists $mclass ] } { 2138 menu $ data_menu(main).cls$cname-tearoff 02142 menu $mclass -tearoff 0 2139 2143 } else { 2140 2144 $mclass delete 0 end 2141 2145 } 2142 $data_menu(main) add cascade -label $cname -menu $mclass 2146 if { $num_options > 1 } { 2147 $data_menu(main) add cascade -label $cname -menu $mclass 2148 set target_menu $mclass 2149 } else { 2150 set target_menu $data_menu(main) 2151 } 2143 2152 foreach inst_entry $entries { 2144 2153 foreach { label single group } $inst_entry break 2145 $mclass add command -label "$label $ninst" \ 2154 set opt_label \ 2155 "$label [ expr { $sel_length>1 ? $ninst : {} } ]" 2156 $target_menu add command -label $opt_label \ 2146 2157 -command [ list TolGui_InvokeMethod \ 2147 2158 $single $obj_addr ] 2148 2159 if { $group ne "" && [ llength $instances ] > 1 } { 2149 2160 # hay una funcion que se aplica a toda la seleccion 2150 $ mclassadd command -label "$label All" \2161 $target_menu add command -label "$label All" \ 2151 2162 -command [ list TolGui_InvokeGroup \ 2152 2163 $_cname $group $instances ]
Note: See TracChangeset
for help on using the changeset viewer.
