]> git.saurik.com Git - wxWidgets.git/commitdiff
don't try to create a color named "Default"
authorPaul Cornett <paulcor@bullseye.com>
Thu, 1 Apr 2010 16:59:34 +0000 (16:59 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 1 Apr 2010 16:59:34 +0000 (16:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/ribbon/ribbondemo.cpp

index 05bbdc4d1d577e920600502855dd7a2eb53c0c33..aac6468f4a38486c0d1b8ff1240a22f208ba4d11 100644 (file)
@@ -641,8 +641,10 @@ wxRibbonGalleryItem* MyFrame::AddColourToGallery(wxRibbonGallery *gallery,
                                  wxColour* value)
 {
     wxRibbonGalleryItem* item = NULL;
-    wxColour c(colour);
-    if(value != NULL)
+    wxColour c;
+    if (colour != wxT("Default"))
+        c = wxColour(colour);
+    if (!c.IsOk())
         c = *value;
     if(c.IsOk())
     {