From 94cd32222362d41e436ac6d9d308b397e61c91b8 Mon Sep 17 00:00:00 2001
From: H.G. Muller <h.g.muller@hccnet.nl>
Date: Thu, 12 Apr 2012 17:28:32 +0200
Subject: [PATCH] Allow clearing of marker dots in any mode

There might already be dots when you change to a mode where there should
be none, and you don't want them to stay on forever in that case...
---
 backend.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/backend.c b/backend.c
index 58c7951..8021102 100644
--- a/backend.c
+++ b/backend.c
@@ -6919,11 +6919,11 @@ void
 MarkTargetSquares (int clear)
 {
   int x, y;
+  if(clear) // no reason to ever suppress clearing
+    for(x=0; x<BOARD_WIDTH; x++) for(y=0; y<BOARD_HEIGHT; y++) marker[y][x] = 0;
   if(!appData.markers || !appData.highlightDragging || appData.icsActive && gameInfo.variant < VariantShogi ||
      !appData.testLegality || gameMode == EditPosition) return;
-  if(clear) {
-    for(x=0; x<BOARD_WIDTH; x++) for(y=0; y<BOARD_HEIGHT; y++) marker[y][x] = 0;
-  } else {
+  if(!clear) {
     int capt = 0;
     GenLegal(boards[currentMove], PosFlags(currentMove), Mark, (void*) marker, EmptySquare);
     if(PosFlags(0) & F_MANDATORY_CAPTURE) {
-- 
1.7.0.4