]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/glcanvas.cpp
removed calls to wxWindowBase::InitBase(), it is called from the ctor anyhow (and...
[wxWidgets.git] / src / gtk / glcanvas.cpp
index f9599d1aa427e75eb1c8e44e92ed4e1e91c2d417..88018d4bb84fd2792800062e556b2e55a395857e 100644 (file)
@@ -130,15 +130,12 @@ void wxGLContext::SetCurrent()
 
 void wxGLContext::SetColour(const wxChar *colour)
 {
-    float r = 0.0;
-    float g = 0.0;
-    float b = 0.0;
-    wxColour *col = wxTheColourDatabase->FindColour(colour);
-    if (col)
+    wxColour col = wxTheColourDatabase->Find(colour);
+    if (col.Ok())
     {
-        r = (float)(col->Red()/256.0);
-        g = (float)(col->Green()/256.0);
-        b = (float)(col->Blue()/256.0);
+        float r = (float)(col.Red()/256.0);
+        float g = (float)(col.Green()/256.0);
+        float b = (float)(col.Blue()/256.0);
         glColor3f( r, g, b);
     }
 }