]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontpickercmn.cpp
fix wrong clear selection (modified patch 1763916)
[wxWidgets.git] / src / common / fontpickercmn.cpp
index 00c68a699dfbf82ab2c7591070a3c222bfcaa12c..3ca7872f1d1c12e7af39e98f183264b9cde8d024 100644 (file)
@@ -58,7 +58,9 @@ bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id,
                         long style, const wxValidator& validator,
                         const wxString &name )
 {
-    if (!wxPickerBase::CreateBase(parent, id, Font2String(initial),
+    if (!wxPickerBase::CreateBase(parent, id,
+                                  Font2String(initial.IsOk() ? initial
+                                                             : *wxNORMAL_FONT),
                                   pos, size, style, validator, name))
         return false;