]> git.entuzijast.net Git - imunes.git/commitdiff
Bugfix: applying an empty custom-config would lead to a deadlock in GUI.
authormarko <marko>
Fri, 5 Aug 2005 15:11:10 +0000 (15:11 +0000)
committermarko <marko>
Fri, 5 Aug 2005 15:11:10 +0000 (15:11 +0000)
Bugfix: correctly implement removeCanvas procedure.

Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

canvas.tcl
editor.tcl

index 0bb61d801095e5b82e22268634b84644cbad7915..802e59276ad0cc81fb739e188479398d765f2d3d 100755 (executable)
 
 
 proc removeCanvas { canvas } {
-    #puts "removeCanvas $canvas"
+    global canvass $canvas
+
+    set i [lsearch $canvass $canvas]
+    set canvass [lreplace $canvass $i $i]
+    set $canvas {}
     return
 }
 
@@ -43,5 +47,6 @@ proc newCanvas { name } {
     set canvas c0
     global $canvas
     lappend canvass $canvas
-    set $canvas {{name default}}
+    set $canvas {name default}
+    return
 }
index 0662067be5431a64e271b938ccc4ee847a662ade..ab6f3ae2ff0289da16e602753f8a4008d63389d3 100755 (executable)
@@ -1316,7 +1316,7 @@ proc customConfigApply { w node } {
 
     set newcmd [$w.ftop.cmd get]
     set newconf [split [$w.text get 0.0 end] {\r}]
-    while { [lindex $newconf end] == {} } {
+    while { [lindex $newconf end] == {} && $newconf != {} } {
        set newconf [lreplace $newconf end end]
     }
     if { [getCustomCmd $node] != $newcmd || \