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:
@@ -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;
|
package com.threerings.media;
|
||||||
|
|
||||||
@@ -148,18 +148,6 @@ public class MediaPanel extends JComponent
|
|||||||
_animmgr.unregisterAnimation(anim);
|
_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
|
// documentation inherited from interface
|
||||||
public void tick (long tickStamp)
|
public void tick (long tickStamp)
|
||||||
{
|
{
|
||||||
@@ -231,8 +219,8 @@ public class MediaPanel extends JComponent
|
|||||||
if (!_tickPaintPending) {
|
if (!_tickPaintPending) {
|
||||||
Shape clip = g.getClip();
|
Shape clip = g.getClip();
|
||||||
if (clip == null) {
|
if (clip == null) {
|
||||||
// mark the whole component as invalid
|
// mark the whole component as dirty
|
||||||
invalidate();
|
repaint();
|
||||||
} else {
|
} else {
|
||||||
dirtyScreenRect(clip.getBounds());
|
dirtyScreenRect(clip.getBounds());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user