OSDN Git Service

2001-03-29 Fernando Nasser <fnasser@redhat.com>
authorfnasser <fnasser>
Thu, 29 Mar 2001 22:42:17 +0000 (22:42 +0000)
committerfnasser <fnasser>
Thu, 29 Mar 2001 22:42:17 +0000 (22:42 +0000)
* library/variable.tcl (update): Cope with varobj type changes.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/variables.tcl

index 7f22c4e..bcffa0f 100644 (file)
@@ -1,5 +1,9 @@
 2001-03-29  Fernando Nasser  <fnasser@redhat.com>
 
+       * library/variable.tcl (update): Cope with varobj type changes.
+
+2001-03-29  Fernando Nasser  <fnasser@redhat.com>
+
        * library/variable.tcl (destructor): Remove file_changed_hook hook.
 
 2001-03-29  Fernando Nasser  <fnasser@redhat.com>
index 5aed147..ee10366 100644 (file)
@@ -803,7 +803,10 @@ class VariableWin {
        return 0
     }
 
+    # ------------------------------------------------------------------
+    # METHOD:   update
     # OVERRIDE THIS METHOD and call it from there
+    # ------------------------------------------------------------------
     method update {} {
        global Update
        debug
@@ -821,8 +824,22 @@ class VariableWin {
        set ChangeList {}
        set variables [$Hlist info children {}]
        foreach var $variables {
-           #      debug "VARIABLE: $var ($Update($this,$var))"
-           set ChangeList [concat $ChangeList [$var update]]
+           # debug "VARIABLE: $var ($Update($this,$var))"
+           set UpdatedList [$var update]
+            if {[lindex $UpdatedList 0] == $var} {
+              debug "Type changed."
+              # We must fix the tree entry to correspond to the new type
+              $Hlist delete offsprings $var
+              $Hlist entryconfigure $var -text [label $var]
+              if {[$var numChildren] > 0} {
+                $Tree setmode $var open
+              } else {
+                $Tree setmode $var none
+              }
+            } else {
+             set ChangeList [concat $ChangeList $UpdatedList]
+             # debug "ChangeList=$ChangeList"
+            }
        }
 
        foreach var $ChangeList {