Whoops, invalidate() means mark the component as needing to be relaid out.

We don't want to do that when we mean simply to repaint the whole
component.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1536 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-06-25 01:00:22 +00:00
parent c6878853e5
commit 5d7decd03b
+3 -15
View File
@@ -1,5 +1,5 @@
//
// $Id: MediaPanel.java,v 1.15 2002/06/19 07:41:37 mdb Exp $
// $Id: MediaPanel.java,v 1.16 2002/06/25 01:00:22 mdb Exp $
package com.threerings.media;
@@ -148,18 +148,6 @@ public class MediaPanel extends JComponent
_animmgr.unregisterAnimation(anim);
}
// documentation inherited
public void invalidate ()
{
super.invalidate();
// invalidate our bounds with the region manager
int width = getWidth(), height = getHeight();
if (width > 0 && height > 0) {
dirtyScreenRect(new Rectangle(0, 0, width, height));
}
}
// documentation inherited from interface
public void tick (long tickStamp)
{
@@ -231,8 +219,8 @@ public class MediaPanel extends JComponent
if (!_tickPaintPending) {
Shape clip = g.getClip();
if (clip == null) {
// mark the whole component as invalid
invalidate();
// mark the whole component as dirty
repaint();
} else {
dirtyScreenRect(clip.getBounds());
}