Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #781 (slow play/undo/redo) #804

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/java/featurecat/lizzie/gui/LizzieMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ protected void paintComponent(Graphics g) {
}
// draw the image
Graphics2D bsGraphics = (Graphics2D) g; // bs.getDrawGraphics();
// Note: #781 is caused by repaint of other parts (toolBar in particular) with
// VALUE_ANTIALIAS_ON. To prevent such unwilling side effects, we change
// RenderingHints only temporary here and restore their old values at the bottom of
// this method.
RenderingHints oldHints = bsGraphics.getRenderingHints();
bsGraphics.setRenderingHint(
RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
bsGraphics.setRenderingHint(
Expand Down Expand Up @@ -172,6 +177,7 @@ protected void paintComponent(Graphics g) {
} else if (Lizzie.config.showStatus) {
drawPonderingState(bsGraphics, loadingText(), loadingX, loadingY, loadingSize);
}
bsGraphics.setRenderingHints(oldHints);
}
}
};
Expand Down