X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=721b2a291bb2b950bd08f9d8c87484933dc9475b;hb=54fc63f1e8ea41966f47d2b60b616db0a9c5010d;hp=8bf5c7652b930458e1694e0b124d0817e26d9fb1;hpb=1cb7d2e7d2ed173e267748ed1216c5d28e3968f8;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 8bf5c76..721b2a2 100644 --- a/dialogs.c +++ b/dialogs.c @@ -752,11 +752,13 @@ SoundOptionsProc () static void DefColor P((int n)); static void AdjustColor P((int i)); +static char oldPngDir[MSG_SIZ]; + static int BoardOptionsOK (int n) { if(appData.overrideLineGap >= 0) lineGap = appData.overrideLineGap; else lineGap = defaultLineGap; - InitDrawingParams(); + InitDrawingParams(strcmp(oldPngDir, appData.pngDirectory)); InitDrawingSizes(-1, 0); DrawPosition(True, NULL); return 1; @@ -859,6 +861,7 @@ AdjustColor (int i) void BoardOptionsProc () { + strncpy(oldPngDir, appData.pngDirectory, MSG_SIZ-1); // to see if it changed GenericPopUp(boardOptions, _("Board Options"), TransientDlg, BoardWindow, MODAL, 0); } @@ -2047,8 +2050,8 @@ MenuCallback (int n) static Option * Exp (int n, int x, int y) { - static int but1, but3, oldSquareSize; - int menuNr = -3; + static int but1, but3, oldW, oldH; + int menuNr = -3, sizing; if(n == 0) { // motion if(SeekGraphClick(Press, x, y, 1)) return NULL; @@ -2068,9 +2071,10 @@ Exp (int n, int x, int y) case -2: shiftKey = !shiftKey; case -3: menuNr = RightClick(Release, x, y, &pmFromX, &pmFromY), but3 = 0; break; case 10: - if(squareSize != oldSquareSize) return NULL; // don't redraw while sizing + sizing = (oldW != x || oldH != y); + oldW = x; oldH = y; + if(sizing) return NULL; // don't redraw while sizing DrawPosition(True, NULL); - oldSquareSize = squareSize; default: return NULL; }