Don't dirty our bounds if setLocation() is called with our current

location. This could possibly break something that depended on the old
behavior, so we'll have to watch for broken things and make them right.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3822 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-01-27 03:28:04 +00:00
parent 3dde8d448a
commit 21181e8ba3
2 changed files with 8 additions and 0 deletions
@@ -65,6 +65,10 @@ public abstract class Animation extends AbstractMedia
// documentation inherited
public void setLocation (int x, int y)
{
if (_bounds.x == x && _bounds.y == y) {
return; // no-op
}
// start with our current bounds
Rectangle dirty = new Rectangle(_bounds);
@@ -150,6 +150,10 @@ public abstract class Sprite extends AbstractMedia
// documentation inherited
public void setLocation (int x, int y)
{
if (x == _ox && y == _oy) {
return; // no-op
}
// start with our current bounds
Rectangle dirty = new Rectangle(_bounds);