From: Vadim Zeitlin Date: Sun, 20 Feb 2005 00:52:49 +0000 (+0000) Subject: don't use invalid font in wxDC used for measuring text extent X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9d9e32a07a99f1388833013a51fef65a682ad5bc don't use invalid font in wxDC used for measuring text extent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index 6fcc0b63eb..f44aec61dd 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -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;