From f8f251d44ee3c1b52125612ce42aed3079566524 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 9 Nov 2004 03:24:50 +0000 Subject: [PATCH] Invalidate sprite before/after bounds update. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3205 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/parlor/card/client/ButtonSprite.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/parlor/card/client/ButtonSprite.java b/src/java/com/threerings/parlor/card/client/ButtonSprite.java index 562ca03dc..8776589f4 100644 --- a/src/java/com/threerings/parlor/card/client/ButtonSprite.java +++ b/src/java/com/threerings/parlor/card/client/ButtonSprite.java @@ -1,5 +1,5 @@ // -// $Id: ButtonSprite.java,v 1.3 2004/11/05 02:07:19 andrzej Exp $ +// $Id: ButtonSprite.java,v 1.4 2004/11/09 03:24:50 andrzej Exp $ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -104,11 +104,17 @@ public class ButtonSprite extends Sprite */ public void updateBounds () { + // invalidate the old... + invalidate(); + // size the bounds to fit our label Dimension size = _label.getSize(); _bounds.width = size.width + PADDING*2 + (_style == ROUNDED ? _arcWidth : 0); _bounds.height = size.height + PADDING*2; + + // ...and the new + invalidate(); } /**