Revision: 40344 http://brlcad.svn.sourceforge.net/brlcad/?rev=40344&view=rev Author: bob1961 Date: 2010-08-27 14:19:00 +0000 (Fri, 27 Aug 2010)
Log Message: ----------- Minor tweaks to updateTreeTopWithName. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2010-08-27 14:00:51 UTC (rev 40343) +++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2010-08-27 14:19:00 UTC (rev 40344) @@ -4099,6 +4099,9 @@ } } +# +# Note -_name is expected to exist in the database. +# ::itcl::body ArcherCore::updateTreeTopWithName {_name} { # Check to see if its okay to add a toplevel node set toplist {} @@ -4106,15 +4109,18 @@ lappend toplist [regsub {/.*} $item {}] } - set i [lsearch -index 0 $toplist $_name] - # Okay to add a toplevel node to the tree + set i [lsearch $toplist $_name] + + # Possibly add a toplevel node to the tree if {$i != -1} { - fillTree {} $_name $mEnableListView + # Add _name if not already there. + set j [lsearch -index 0 $mPNode2CList() $_name] + if {$j == -1} { + fillTree {} $_name $mEnableListView + } } else { # Not found in call to tops, so possibly need to update _name as a member - # of some other combination(s). This can happen when _name is being - # referred to by one or more combinations even though it doesn't exist. - + # of some other combination(s). if {![catch {set tlists $mText2Node($_name)}]} { foreach tlist $tlists { set cnode [lindex $tlist 0] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits