]> git.saurik.com Git - wxWidgets.git/commitdiff
Colour property with attribute wxPG_COLOUR_ALLOW_CUSTOM = false did not render correctly
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 3 Jul 2009 14:39:26 +0000 (14:39 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 3 Jul 2009 14:39:26 +0000 (14:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/advprops.cpp

index 7fa93bcc192849eb0c07f1c22223fb7a5430f065..ed2944c9fc2097aa110a81934e175e12139a9f34 100644 (file)
@@ -1306,8 +1306,10 @@ void wxSystemColourProperty::OnCustomPaint( wxDC& dc, const wxRect& rect,
 {
     wxColour col;
 
-    if ( paintdata.m_choiceItem >= 0 && paintdata.m_choiceItem < (int)m_choices.GetCount() &&
-         paintdata.m_choiceItem != GetCustomColourIndex() )
+    if ( paintdata.m_choiceItem >= 0 &&
+         paintdata.m_choiceItem < (int)m_choices.GetCount() &&
+         (paintdata.m_choiceItem != GetCustomColourIndex() ||
+          m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
     {
         int colInd = m_choices[paintdata.m_choiceItem].GetValue();
         col = GetColour( colInd );