]> OCCT Git - occt.git/commitdiff
0025359: In Draw Test Harness: content of menu-items "Curves" and "Surfaces" is incre...
authorisz <isz@opencascade.com>
Mon, 13 Oct 2014 12:41:00 +0000 (16:41 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Oct 2014 09:58:48 +0000 (13:58 +0400)
Menus "Curves" and "Surfaces" are destroyed now (if they exist) before displaying.

src/DrawResources/CURVES.tcl
src/DrawResources/SURFACES.tcl

index f85e7814dab965719f96e111d553e3a8bdf8ee2a..e35b55aa2179ea41e0ac4839eb6a12ec8c091ba1 100644 (file)
 
 if { [info commands addmenu] == "" } { return }
 
+global theMenus
+if [info exists theMenus(Curves)] {
+  destroy [string trimright $theMenus(Curves) ".menu"]
+  unset theMenus(Curves)
+}
+
 addmenu Curves "Line"    {
     dialbox line name l origin {0 0 0} direction {1 0 0}
 }
index 82968f6f6941ffc805433e87ec45c7ffb4a22402..f16e15055018239c5dd695a885853582d3df9629 100644 (file)
 
 if { [info commands addmenu] == "" } { return }
 
+global theMenus
+if [info exists theMenus(Surfaces)] {
+  destroy [string trimright $theMenus(Surfaces) ".menu"]
+  unset theMenus(Surfaces)
+}
+
 proc dialanasurf {command sname args} {
     set com "dialbox $command name $sname origin {0 0 0} normal {0 0 1} xdir {1 0 0} "
     foreach l $args {append com " $l"}