]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fontcmn.cpp
fixed memory leak when SetTargetWindow() was called more than once and made DeleteEvt...
[wxWidgets.git] / src / common / fontcmn.cpp
index c8e3bec3614340d76f805b61a7b25e6483ddd240..bdc45ec3bcff1f02f0ab2a9405cac7711029d31c 100644 (file)
@@ -83,7 +83,7 @@ wxNativeFontInfo *wxFontBase::GetNativeFontInfo() const
     wxNativeFontInfo *fontInfo = new wxNativeFontInfo();
 
     fontInfo->SetPointSize(GetPointSize());
-    fontInfo->SetFamily(GetFamily());
+    fontInfo->SetFamily((wxFontFamily)GetFamily());
     fontInfo->SetStyle((wxFontStyle)GetStyle());
     fontInfo->SetWeight((wxFontWeight)GetWeight());
     fontInfo->SetUnderlined(GetUnderlined());
@@ -257,7 +257,7 @@ bool wxNativeFontInfo::FromString(const wxString& s)
     token = tokenizer.GetNextToken();
     if ( !token.ToLong(&l) )
         return FALSE;
-    family = (int)l;
+    family = (wxFontFamily)l;
 
     token = tokenizer.GetNextToken();
     if ( !token.ToLong(&l) )
@@ -339,6 +339,11 @@ wxString wxNativeFontInfo::GetFaceName() const
     return faceName;
 }
 
+wxFontFamily wxNativeFontInfo::GetFamily() const
+{
+    return family;
+}
+
 wxFontEncoding wxNativeFontInfo::GetEncoding() const
 {
     return encoding;
@@ -366,7 +371,12 @@ void wxNativeFontInfo::SetUnderlined(bool underlined_)
 
 void wxNativeFontInfo::SetFaceName(wxString facename_)
 {
-    facename = facename_;
+    faceName = facename_;
+}
+
+void wxNativeFontInfo::SetFamily(wxFontFamily family_)
+{
+    family = family_;
 }
 
 void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_)