X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec376c8fd9ff813392030426acd2317c6fa6527e..c1841ac2e30ca2c4d0cffcc8e60892e01d79ef8e:/src/generic/fontpickerg.cpp diff --git a/src/generic/fontpickerg.cpp b/src/generic/fontpickerg.cpp index 1a67f07b85..26f9908d7d 100644 --- a/src/generic/fontpickerg.cpp +++ b/src/generic/fontpickerg.cpp @@ -24,11 +24,10 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP - #include "wx/window.h" -#endif //WX_PRECOMP +#if wxUSE_FONTPICKERCTRL #include "wx/fontpicker.h" + #include "wx/fontdlg.h" @@ -36,8 +35,6 @@ // implementation // ============================================================================ -#if wxUSE_FONTPICKERCTRL - wxFontData wxGenericFontButton::ms_data; IMPLEMENT_DYNAMIC_CLASS(wxGenericFontButton, wxButton) @@ -67,7 +64,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id, wxCommandEventHandler(wxGenericFontButton::OnButtonClick), NULL, this); - m_selectedFont = initial; + m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT; UpdateFont(); InitFontData();