restored variabes initialization in OnButtonSet() to avoid spurious MSVC warnings
[wxWidgets.git] / src / generic / htmllbox.cpp
index c4256b2dea6775fa7fb35172e72f9dd8124c189d..6173b2ef2d4bffcbbb42ec765a7c3f356a000e90 100644 (file)
@@ -225,7 +225,6 @@ void wxHtmlListBox::Init()
     m_htmlParser = NULL;
     m_htmlRendStyle = new wxHtmlListBoxStyle(*this);
     m_cache = new wxHtmlListBoxCache;
-    m_fontEncoding = wxFONTENCODING_ISO8859_1;
 }
 
 bool wxHtmlListBox::Create(wxWindow *parent,
@@ -295,7 +294,8 @@ void wxHtmlListBox::CacheItem(size_t n) const
             m_htmlParser->SetDC(new wxClientDC(self));
             m_htmlParser->SetFS(&self->m_filesystem);
 #if !wxUSE_UNICODE
-            m_htmlParser->SetInputEncoding(m_fontEncoding);
+            if (GetFont().Ok())
+                m_htmlParser->SetInputEncoding(GetFont().GetEncoding());
 #endif
             // use system's default GUI font by default:
             m_htmlParser->SetStandardFonts();