From 6fd403b88d810a55eaf5f6869d3349a7f90497a1 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 26 Nov 2003 23:06:05 +0000 Subject: [PATCH] Wait until tick() is done before we clear the action. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2884 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/puzzle/client/PuzzleBoardView.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/puzzle/client/PuzzleBoardView.java b/src/java/com/threerings/puzzle/client/PuzzleBoardView.java index e5afb9eef..b80b72078 100644 --- a/src/java/com/threerings/puzzle/client/PuzzleBoardView.java +++ b/src/java/com/threerings/puzzle/client/PuzzleBoardView.java @@ -1,5 +1,5 @@ // -// $Id: PuzzleBoardView.java,v 1.3 2003/11/26 02:11:34 mdb Exp $ +// $Id: PuzzleBoardView.java,v 1.4 2003/11/26 23:06:05 mdb Exp $ package com.threerings.puzzle.client; @@ -358,7 +358,15 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel getActionCount() + ":" + isShowing()); } if (getActionCount() == 0) { - _pctrl.boardActionCleared(); + // we're probably in the middle of a tick() in an + // animationDidFinish() call and we want everyone to finish + // processing their business before we go clearing the action, + // so we queue this up to be run after the tick is complete + _ctx.getClient().getInvoker().invokeLater(new Runnable() { + public void run () { + _pctrl.boardActionCleared(); + } + }); } }