]> git.saurik.com Git - wxWidgets.git/commitdiff
Call virtual ctrl->GetDefaultAttributes() instead of static GetClassDefaultAttributes()
authorJaakko Salli <jaakko.salli@dnainternet.net>
Tue, 5 Jan 2010 16:42:35 +0000 (16:42 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Tue, 5 Jan 2010 16:42:35 +0000 (16:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/editors.cpp

index 8607c44f28634034982abe3f663495f1d10b3b38..cdff0592d0df11d116ef12dbd0a372a86a181347 100644 (file)
@@ -262,7 +262,10 @@ void wxPGEditor::SetControlAppearance( wxPropertyGrid* pg,
         }
     }
 
         }
     }
 
-    wxVisualAttributes vattrs = ctrl->GetClassDefaultAttributes();
+    // Do not make the mistake of calling GetClassDefaultAttributes()
+    // here. It is static, while GetDefaultAttributes() is virtual
+    // and the correct one to use.
+    wxVisualAttributes vattrs = ctrl->GetDefaultAttributes();
 
     // Foreground colour
     const wxColour& fgCol = cell.GetFgCol();
 
     // Foreground colour
     const wxColour& fgCol = cell.GetFgCol();