From 6c20dd0e5e6c0354cdcd1f07a5645d0411f87a6d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 16 Mar 2012 22:41:19 +0100 Subject: [PATCH] Fix taking effect of some option changes This fixes a bug reported at Ubuntu: when switching off move highlighting in Two Machines mode, the last move before the switch stayed highlighted. The GeneralOptionsOK() now clears any remaining highlights when highlighing is off. Similar problems with blind-fold mode and coordinates, which require a total board redraw to take effect, are now solved by also forcing such a redraw in GeneralOptionsOK() when they change. --- xoptions.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/xoptions.c b/xoptions.c index 6535dd6..0c32929 100644 --- a/xoptions.c +++ b/xoptions.c @@ -250,7 +250,7 @@ CreateComboPopup (Widget parent, Option *option, int n) extern WindowPlacement wpComment, wpTags, wpMoveHistory; char *trialSound; -static int oldCores, oldPonder; +static int oldCores, oldPonder, oldShow, oldBlind; int MakeColors P((void)); void CreateGCs P((int redo)); void CreateAnyPieces P((void)); @@ -410,6 +410,8 @@ GeneralOptionsOK (int n) int newPonder = appData.ponderNextMove; appData.ponderNextMove = oldPonder; PonderNextMoveEvent(newPonder); + if(!appData.highlightLastMove) ClearHighlights(), ClearPremoveHighlights(); + if(oldShow != appData.showCoords || oldBlind != appData.blindfold) DrawPosition(TRUE, NULL); return 1; } @@ -1427,6 +1429,7 @@ void OptionsProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) { oldPonder = appData.ponderNextMove; + oldShow = appData.showCoords; oldBlind = appData.blindfold; GenericPopUp(generalOptions, _("General Options"), 0); } -- 1.7.0.4