Merge branch 'v4.7.x' into master
[xboard.git] / winboard / wedittags.c
index 823d7dd..b3cf334 100644 (file)
@@ -118,6 +118,7 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
   case WM_COMMAND:\r
     switch (LOWORD(wParam)) {\r
     case IDOK:\r
+    case OPT_TagsSave:\r
       if (canEditTags) {\r
        char *p, *q;\r
        /* Read changed options from the dialog box */\r
@@ -133,13 +134,13 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
        }\r
        *p = NULLCHAR; err = 0;\r
         if(resPtr) *resPtr = strdup(str); else\r
-       if(bookUp) SaveToBook(str); else\r
+       if(bookUp) SaveToBook(str), DisplayBook(currentMove); else\r
        err = ReplaceTags(str, &gameInfo);\r
        if (err) DisplayError(_("Error replacing tags."), err);\r
 \r
        free(str);\r
       }\r
-      TagsPopDown();\r
+      if(LOWORD(wParam) == IDOK) TagsPopDown();\r
       return TRUE;\r
       \r
     case IDCANCEL:\r