From: isz Date: Mon, 13 Oct 2014 12:41:00 +0000 (+0400) Subject: 0025359: In Draw Test Harness: content of menu-items "Curves" and "Surfaces" is incre... X-Git-Tag: V6_8_0~82 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=196b01482b056415fc005c483c4526e92d2ecf22;p=occt.git 0025359: In Draw Test Harness: content of menu-items "Curves" and "Surfaces" is increased after each sample launching Menus "Curves" and "Surfaces" are destroyed now (if they exist) before displaying. --- diff --git a/src/DrawResources/CURVES.tcl b/src/DrawResources/CURVES.tcl index f85e7814da..e35b55aa21 100644 --- a/src/DrawResources/CURVES.tcl +++ b/src/DrawResources/CURVES.tcl @@ -13,6 +13,12 @@ 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} } diff --git a/src/DrawResources/SURFACES.tcl b/src/DrawResources/SURFACES.tcl index 82968f6f69..f16e150550 100644 --- a/src/DrawResources/SURFACES.tcl +++ b/src/DrawResources/SURFACES.tcl @@ -13,6 +13,12 @@ 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"}