Toggle visibility when delaying repainting to keep child components from painting while we aren't
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@557 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -741,11 +741,13 @@ public class MisoScenePanel extends VirtualMediaPanel
|
|||||||
_ulpos.setLocation(_tcoords);
|
_ulpos.setLocation(_tcoords);
|
||||||
if (rethink() > 0) {
|
if (rethink() > 0) {
|
||||||
_delayRepaint = mightDelayPaint;
|
_delayRepaint = mightDelayPaint;
|
||||||
log.info("Got new pending blocks " +
|
// If this is a complete repaint, turn off visibility while we're resolving to
|
||||||
"[need=" + _visiBlocks.size() +
|
// keep child components or media panels from drawing.
|
||||||
", of=" + _pendingBlocks +
|
if (_delayRepaint) {
|
||||||
", view=" + StringUtil.toString(_vbounds) +
|
setVisible(false);
|
||||||
", delay=" + _delayRepaint + "].");
|
}
|
||||||
|
log.info("Got new pending blocks", "need", _visiBlocks.size(), "of",
|
||||||
|
_pendingBlocks, "view", StringUtil.toString(_vbounds), "delay", _delayRepaint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -956,9 +958,11 @@ public class MisoScenePanel extends VirtualMediaPanel
|
|||||||
// resolution, recompute our visible object set and show ourselves
|
// resolution, recompute our visible object set and show ourselves
|
||||||
if (_visiBlocks.remove(block) && _visiBlocks.size() == 0) {
|
if (_visiBlocks.remove(block) && _visiBlocks.size() == 0) {
|
||||||
recomputeVisible();
|
recomputeVisible();
|
||||||
log.info("Restoring repaint... [left=" + _pendingBlocks +
|
log.info("Restoring repaint... ", "left", _pendingBlocks, "view",
|
||||||
", view=" + StringUtil.toString(_vbounds) + "].");
|
StringUtil.toString(_vbounds));
|
||||||
_delayRepaint = false;
|
_delayRepaint = false;
|
||||||
|
// Need to restore visibility as it may have been turned of as a result of the delay
|
||||||
|
setVisible(true);
|
||||||
_remgr.invalidateRegion(_vbounds);
|
_remgr.invalidateRegion(_vbounds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user