If we pass in a panel, we really DO want to use it.
And don't NPE if we resolve a block and don't have a panel (though my NPE was really because of the first problem) git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@514 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -61,6 +61,7 @@ public class SceneBlock
|
||||
{
|
||||
this(panel.getSceneModel(), panel.getSceneMetrics(), panel.getTileManager(), tx, ty,
|
||||
width, height);
|
||||
_panel = panel;
|
||||
}
|
||||
|
||||
public SceneBlock (MisoSceneModel model, MisoSceneMetrics metrics, TileManager tileMgr,
|
||||
@@ -213,7 +214,9 @@ public class SceneBlock
|
||||
*/
|
||||
protected void wasResolved ()
|
||||
{
|
||||
_panel.blockResolved(this);
|
||||
if (_panel != null) {
|
||||
_panel.blockResolved(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,9 +236,8 @@ public class SceneBlock
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the bounds of the screen coordinate rectangle that contains
|
||||
* all pixels that are drawn on by all tiles and objects in this
|
||||
* block.
|
||||
* Returns the bounds of the screen coordinate rectangle that contains all pixels that are
|
||||
* drawn on by all tiles and objects in this block.
|
||||
*/
|
||||
public Rectangle getScreenBounds ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user