From 11fc21a59b8f8998fe081b436e393d43f451fd17 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 16 Aug 2003 03:42:28 +0000 Subject: [PATCH] Added code for refreshing the currently displayed scene. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2777 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../miso/client/MisoScenePanel.java | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/java/com/threerings/miso/client/MisoScenePanel.java b/src/java/com/threerings/miso/client/MisoScenePanel.java index f66647506..d9c78622f 100644 --- a/src/java/com/threerings/miso/client/MisoScenePanel.java +++ b/src/java/com/threerings/miso/client/MisoScenePanel.java @@ -1,5 +1,5 @@ // -// $Id: MisoScenePanel.java,v 1.48 2003/07/27 02:50:53 mdb Exp $ +// $Id: MisoScenePanel.java,v 1.49 2003/08/16 03:42:28 mdb Exp $ package com.threerings.miso.client; @@ -108,12 +108,7 @@ public class MisoScenePanel extends VirtualMediaPanel _model = model; // clear out old blocks and objects - _blocks.clear(); - _vizobjs.clear(); - _masks.clear(); - if (_dpanel != null) { - _dpanel.newScene(); - } + clearScene(); centerOnTile(0, 0); if (isShowing()) { @@ -122,6 +117,31 @@ public class MisoScenePanel extends VirtualMediaPanel } } + /** + * Clears out our old scene business. + */ + protected void clearScene () + { + _blocks.clear(); + _vizobjs.clear(); + _masks.clear(); + if (_dpanel != null) { + _dpanel.newScene(); + } + } + + /** + * Completely invalidates our current resolved scene and re-resolves + * it from the ground up. + */ + protected void refreshScene () + { + clearScene(); + rethink(); + _delayRepaint = true; + _remgr.invalidateRegion(_vbounds); + } + /** * Moves the scene such that the specified tile is in the center. */