@@ -337,7 +337,18 @@ private void refreshRange(AddressRange range) {
337
337
}
338
338
339
339
private void objectRestored (DomainObjectChangeRecord rec ) {
340
- coordinatesActivated (current .reFindThread ());
340
+ /**
341
+ * It's possible an "undo" or other transaction rollback will cause the current thread
342
+ * to be replaced by another object. If that's the case, we need to adjust our
343
+ * coordinates.
344
+ *
345
+ * If that adjustment does not otherwise cause the table to update, we have to fire that
346
+ * event, since the register values may have changed, esp., if this "restored" event is
347
+ * the result of many events being coalesced.
348
+ */
349
+ if (!coordinatesActivated (current .reFindThread ())) {
350
+ regsTableModel .fireTableDataChanged ();
351
+ }
341
352
}
342
353
343
354
private void registerValueChanged (TraceAddressSpace space , TraceAddressSnapRange range ,
@@ -803,10 +814,16 @@ private void doSetTrace(Trace trace) {
803
814
addNewTraceListener ();
804
815
}
805
816
806
- public void coordinatesActivated (DebuggerCoordinates coordinates ) {
817
+ /**
818
+ * Notify this provider of new coordinates
819
+ *
820
+ * @param coordinates the new coordinates
821
+ * @return true if the new coordinates caused the table to update
822
+ */
823
+ public boolean coordinatesActivated (DebuggerCoordinates coordinates ) {
807
824
if (sameCoordinates (current , coordinates )) {
808
825
current = coordinates ;
809
- return ;
826
+ return false ;
810
827
}
811
828
812
829
previous = current ;
@@ -820,6 +837,7 @@ public void coordinatesActivated(DebuggerCoordinates coordinates) {
820
837
recomputeViewKnown ();
821
838
loadRegistersAndValues ();
822
839
contextChanged ();
840
+ return true ;
823
841
}
824
842
825
843
protected void traceClosed (Trace trace ) {
0 commit comments