Here is a patch for bug 2006022 (http://sourceforge.net/tracker/index.php?func=detail&aid=2006022&group_id=44492&atid=439737)


Index: UndoableMovesPanel.java
===================================================================
--- UndoableMovesPanel.java (revision 2293)
+++ UndoableMovesPanel.java (working copy)
@@ -31,6 +31,11 @@
private final GameData m_data;
private final MovePanel m_movePanel;

+ // Place scroll pane in class global scope so the inner undo class
can record
+ // the position so we can go back to that place.
+ JScrollPane scroll;
+ Integer scrollBarPreviousValue = null;
+
public UndoableMovesPanel(GameData data, MovePanel movePanel)
{
m_data = data;
@@ -94,12 +99,15 @@
}
}

- JScrollPane scroll = new JScrollPane(items);
+ scroll = new JScrollPane(items);
scroll.setBorder(null);
scroll.getVerticalScrollBar().setUnitIncrement(scrollIncrement);

+ if (scrollBarPreviousValue != null) {
+
scroll.getVerticalScrollBar().setValue(scrollBarPreviousValue);
+ scrollBarPreviousValue = null;
+ }

-
add(scroll, BorderLayout.CENTER);
SwingUtilities.invokeLater(new Runnable()
{
@@ -176,6 +184,8 @@

public void actionPerformed(ActionEvent e)
{
+ // Record position of scroll bar as percentage.
+ scrollBarPreviousValue =
scroll.getVerticalScrollBar().getValue();
m_movePanel.undoMove(m_moveIndex);
}
}
@@ -190,7 +200,7 @@
}

public void actionPerformed(ActionEvent e)
- {
+ {
m_movePanel.cancelMove();

if(!m_movePanel.getMap().isShowing(m_move.getRoute().getEnd()))
m_movePanel.getMap().centerOn(m_move.getRoute().getEnd());