]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/colordlg.cpp
fixed pasting of Unicode strings
[wxWidgets.git] / src / msw / colordlg.cpp
index 53eed0cca9242074b0697bf5dedb1cf531bafc95..92036a89af7cf8b02da34be55c389e07c7cc984e 100644 (file)
@@ -128,7 +128,12 @@ int wxColourDialog::ShowModal()
 
     int i;
     for (i = 0; i < 16; i++)
-      custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]);
+    {
+        if (m_colourData.m_custColours[i].Ok())
+            custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]);
+        else
+            custColours[i] = RGB(255,255,255);
+    }
 
     chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR);
     if ( m_parent )