From 22909aef2d8b1f1d245a73640c215af93538c9a9 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Tue, 5 Jan 2010 16:42:35 +0000 Subject: [PATCH] Call virtual ctrl->GetDefaultAttributes() instead of static GetClassDefaultAttributes() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/editors.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 8607c44f28..cdff0592d0 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -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(); -- 2.49.0