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