From 2e82051a6aaaccf1e8a242f9c8141e4167e652d2 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 26 May 2017 00:20:17 -0700 Subject: altoslib,altosuilib,altosui: Get stats and replay working again. Stats are really easy with all of the data in memory. Replay takes a special thread to run the data and dump it into a single state. Signed-off-by: Keith Packard --- altosui/AltosFlightUI.java | 2 ++ altosui/AltosUI.java | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'altosui') diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index eaf19256..23a62e95 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -115,7 +115,9 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay { JComponent tab = which_tab(state); if (tab != cur_tab) { + System.out.printf("checking tab for state %s\n", AltosLib.state_name(state.state())); if (cur_tab == pane.getSelectedComponent()) { + System.out.printf("switch tabs\n"); pane.setSelectedComponent(tab); } cur_tab = tab; diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index b0cff381..a6b967f8 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -481,8 +481,7 @@ public class AltosUI extends AltosUIFrame { AltosRecordSet set = record_set(file); if (set == null) return null; -// return new AltosReplayReader(states.iterator(), file); - return null; + return new AltosReplayReader(set, file); } static boolean process_replay(File file) { -- cgit v1.2.3