Skip to content

Commit 24f1dd9

Browse files
copy and dispose graphics in MarkableScrollPane::paint
1 parent 3d7af25 commit 24f1dd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/MarkableScrollPane.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ public void paint(Graphics graphics) {
296296
this.paintState = this.createPaintState();
297297
}
298298

299-
this.paintState.paint(graphics);
299+
final Graphics disposableGraphics = graphics.create();
300+
this.paintState.paint(disposableGraphics);
301+
disposableGraphics.dispose();
300302
}
301303

302304
private PaintState createPaintState() {

0 commit comments

Comments
 (0)