]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use invalid font in wxDC used for measuring text extent
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Feb 2005 00:52:49 +0000 (00:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Feb 2005 00:52:49 +0000 (00:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datectlg.cpp

index 6fcc0b63ebe5f6cbce3013a93ac84a5f431d462e..f44aec61ddfc6fd2f94b5362465a88ca5d4a8ae7 100644 (file)
@@ -341,7 +341,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
             wxFocusEventHandler(wxDatePickerCtrlGeneric::OnSetFocus));
 
     wxClientDC dc(yearControl);
-    dc.SetFont(m_font);
+    dc.SetFont(yearControl->GetFont());
     wxCoord width, dummy;
     dc.GetTextExtent(wxT("2000"), &width, &dummy);
     width += ConvertDialogToPixels(wxSize(20, 0)).x;