]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/colour.cpp
Ensure that the native font is initialized so the face name and such
[wxWidgets.git] / src / x11 / colour.cpp
index 7431369b7ff7d27a43015b4e753c1487bb6be2b5..d9ef08580817ffa92c598c118a4f137bdcaaccfb 100644 (file)
@@ -10,7 +10,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "colour.h"
 #endif
 
@@ -157,10 +157,9 @@ wxColour::wxColour( unsigned char red, unsigned char green, unsigned char blue )
 
 void wxColour::InitFromName( const wxString &colourName )
 {
-    wxNode *node = (wxNode *) NULL;
-    if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
+    wxColour* col;
+    if ( (wxTheColourDatabase) && (col = wxTheColourDatabase->FindColourNoAdd(colourName)) )
     {
-        wxColour *col = (wxColour*)node->GetData();
         UnRef();
         if (col) Ref( *col );
     }