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
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user