removing some rather verbose debug messages that seem no longer needed.
[xboard.git] / winboard / wclipbrd.c
index b9514bb..f13e77f 100644 (file)
@@ -32,9 +32,9 @@
 #include <sys/stat.h>\r
 \r
 #include "common.h"\r
-#include "winboard.h"\r
 #include "frontend.h"\r
 #include "backend.h"\r
+#include "winboard.h"\r
 #include "wclipbrd.h"\r
 \r
 /* Imports from winboard.c */\r
@@ -50,6 +50,7 @@ CopyFENToClipboard()
 {\r
   char *fen = NULL;\r
 \r
+  if(gameMode == EditPosition) EditPositionDone(TRUE); // [HGM] mak sure castling rights are set consistently\r
   fen = PositionToFEN(currentMove, NULL);\r
   if (!fen) {\r
     DisplayError("Unable to convert position to FEN.", 0);\r
@@ -349,15 +350,11 @@ PasteTextFromClipboard(char **text)
     fprintf(debugFP, "PasteTextFromClipboard(): lock count %d\n", lockCount);\r
   }\r
   SetLastError(NO_ERROR);\r
-#if 1\r
   /*suggested by Wilkin Ng*/\r
   lockCount = GlobalFlags(hClipMem) & GMEM_LOCKCOUNT;\r
   if (lockCount) {\r
     locked = GlobalUnlock(hClipMem);\r
   }\r
-#else\r
-  locked = GlobalUnlock(hClipMem);\r
-#endif\r
   err = GetLastError();\r
   if (appData.debugMode) {\r
     lockCount = GlobalFlags(hClipMem) & GMEM_LOCKCOUNT;\r