Avoid some repaints when we can.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3664 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2005-07-28 21:10:11 +00:00
parent 898a3bf5d5
commit d87ca1d8e1
@@ -80,8 +80,10 @@ public class PlayerStatusView extends JPanel
*/ */
public void setStatus (int status) public void setStatus (int status)
{ {
_status = status; if (_status != status) {
repaint(); _status = status;
repaint();
}
} }
/** /**
@@ -89,8 +91,10 @@ public class PlayerStatusView extends JPanel
*/ */
public void setHighlighted (boolean highlight) public void setHighlighted (boolean highlight)
{ {
_highlight = highlight; if (_highlight != highlight) {
repaint(); _highlight = highlight;
repaint();
}
} }
/** Returns a string representation of this instance. */ /** Returns a string representation of this instance. */