]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colour.cpp
Fix for the irksome, 'Details' sizing bug. Or at least a patch on a hornet's
[wxWidgets.git] / src / gtk / colour.cpp
index d4b919414586f8bbfac6371fba3492c1e048edc0..84c790a329fcea1dbd7299c85b0355ce1c6054de 100644 (file)
@@ -35,6 +35,14 @@ public:
         m_hasPixel = FALSE;
     }
     
+    wxColourRefData(const wxColourRefData& data)
+        : wxObjectRefData()
+    {
+        m_color = data.m_color;
+        m_colormap = data.m_colormap;
+        m_hasPixel = data.m_hasPixel;
+    }
+
     ~wxColourRefData()
     {
         FreeColour();
@@ -110,8 +118,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
     FreeColour();
     
 #ifdef __WXGTK20__
-    if ((m_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
-       (m_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
+    if ( (cmap->visual->type == GDK_VISUAL_GRAYSCALE) ||
+            (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR) )
 #else
     GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap;
     if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||