]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colour.cpp
Fixed drawing sample compilo for wxMotif (doesn't have wxRegion::Offset)
[wxWidgets.git] / src / gtk / colour.cpp
index d4b919414586f8bbfac6371fba3492c1e048edc0..1b82a30b01a39f2cfce2d81c7b5ea25b7aa70792 100644 (file)
@@ -35,6 +35,13 @@ public:
         m_hasPixel = FALSE;
     }
     
+    wxColourRefData(const wxColourRefData& data)
+    {
+        m_color = data.m_color;
+        m_colormap = data.m_colormap;
+        m_hasPixel = data.m_hasPixel;
+    }
+
     ~wxColourRefData()
     {
         FreeColour();
@@ -110,8 +117,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) ||