VDBVariableObjectListApplication.st
changeset 62 8a52495c2108
parent 60 bcdb393c956f
child 74 1a238ee98ed3
--- a/VDBVariableObjectListApplication.st	Mon Feb 05 21:46:29 2018 +0000
+++ b/VDBVariableObjectListApplication.st	Tue Feb 06 14:35:33 2018 +0000
@@ -203,6 +203,37 @@
 
 !VDBVariableObjectListApplication methodsFor:'change & update-delayed'!
 
+delayedInvalidateInternalList
+
+    "/ Updating children may take a while as it needs to issue
+    "/ several commands to the GDB and wait for results. To avoid
+    "/ flickering, we first force an update of all values
+    "/ in background and then force an invalidate.
+    "/ 
+    "/ Note, that update of each individual variable is pushed back 
+    "/ to event queue, allowing the UI to react for user events that 
+    "/ may have come meanwhile.
+
+    | children changed |
+
+    children := internalListHolder root children.
+    changed := false.
+    children do:[:each | 
+        self enqueueDelayedAction: [ 
+            "/ Update the child, but only if the list of currently displayed
+            "/ children remains the same. Keep in mind that user may have
+            "/ have switched to another frame before we're finished with the update.
+            internalListHolder root children == children ifTrue: [ changed := each varobj hasChanged or:[changed] ] 
+        ].
+    ].
+    self enqueueDelayedAction:[ 
+        (internalListHolder root children == children and:[changed]) ifTrue:[ super delayedInvalidateInternalList ].
+    ]
+
+    "Created: / 06-02-2018 / 12:52:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-03-2018 / 09:42:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 delayedUpdateInternalList
     | root |