From 55214567d282236180f34f0b0363559a52cdc8e2 Mon Sep 17 00:00:00 2001 From: Hiraoka Date: Mon, 7 Nov 2022 22:18:34 +0900 Subject: [PATCH 1/2] Fix kaorahi/lizzie#5 (flicker of movenums in subboard) by @some2112 --- src/main/java/featurecat/lizzie/gui/BoardRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java index 76351c04d..5ff8dbc84 100644 --- a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java +++ b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java @@ -152,7 +152,7 @@ public void draw(Graphics2D g) { // timer.lap("rendering images"); if (!isMainBoard) { - if (Lizzie.config.showBranchNow()) { + if (showingBranch) { drawMoveNumbers(g); } return; From fe4624a353526babb3e533954304fd41c3399d0c Mon Sep 17 00:00:00 2001 From: Hiraoka Date: Mon, 7 Nov 2022 22:18:34 +0900 Subject: [PATCH 2/2] Fix: PV stones were erased wrongly by "v" key (toggleShowBranch) on subboard --- src/main/java/featurecat/lizzie/gui/BoardRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java index 5ff8dbc84..46aa77b6c 100644 --- a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java +++ b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java @@ -676,14 +676,15 @@ private Optional getBestMove() { /** Render the shadows and stones in correct background-foreground order */ private void renderImages(Graphics2D g) { + boolean showBranchNow = Lizzie.config.showBranchNow() || !isMainBoard; g.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_OFF); g.drawImage(cachedEstimateLargeRectImage, x, y, null); g.drawImage(cachedStonesShadowImage, x, y, null); - if (Lizzie.config.showBranchNow()) { + if (showBranchNow) { g.drawImage(branchStonesShadowImage, x, y, null); } g.drawImage(cachedStonesImage, x, y, null); - if (Lizzie.config.showBranchNow()) { + if (showBranchNow) { g.drawImage(branchStonesImage, x, y, null); } g.drawImage(cachedEstimateSmallRectImage, x, y, null);