Revision: 56218
          http://sourceforge.net/p/brlcad/code/56218
Author:   bob1961
Date:     2013-07-25 17:02:27 +0000 (Thu, 25 Jul 2013)
Log Message:
-----------
Added ArcherCore::updatePrimitiveLabels (used by ArcherCore::kill and 
ArcherCore::killall to update cadwidgets::Ged's -primitiveLabels option before 
calling kill/killall.

Modified Paths:
--------------
    brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl

Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2013-07-25 16:59:28 UTC 
(rev 56217)
+++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2013-07-25 17:02:27 UTC 
(rev 56218)
@@ -970,6 +970,7 @@
 
        method watchVar {_name1 _name2 _op}
        method accordianCallback {_item _state}
+       method updatePrimitiveLabels {args}
     }
 }
 
@@ -6457,11 +6458,38 @@
     eval gedWrapper item 0 0 1 0 $args
 }
 
+::itcl::body ArcherCore::updatePrimitiveLabels {args} {
+    if {![info exists itk_component(ged)]} {
+       return
+    }
+
+    set plist [$itk_component(ged) cget -primitiveLabels]
+    if {[llength $plist] > 0} {
+       set tail_plist {}
+       foreach item $plist {
+           lappend tail_plist [file tail $item]
+       }
+
+       foreach item [eval gedCmd kill -n $args] {
+           set item [string trim $item]
+           set i [lsearch $tail_plist $item]
+           if {$i != -1} {
+               set plist [lreplace $plist $i $i]
+               set tail_plist [lreplace $tail_plist $i $i]
+           }
+       }
+
+       $itk_component(ged) configure -primitiveLabels $plist
+    }
+}
+
 ::itcl::body ArcherCore::kill {args} {
+    eval updatePrimitiveLabels $args
     eval gedWrapper kill 1 0 1 2 $args
 }
 
 ::itcl::body ArcherCore::killall {args} {
+    eval updatePrimitiveLabels $args
     eval gedWrapper killall 1 0 1 2 $args
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to