]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_choic.cpp
overseeing the obvious, there is already a perfect scroll call for HIView...
[wxWidgets.git] / contrib / src / xrc / xh_choic.cpp
index 2f91e382a8f204a5b9afc96343094dfb3d9d9b27..15f7c6a77cecc5161bf373bb60105bbd2cd826cf 100644 (file)
@@ -23,6 +23,8 @@
 #include "wx/choice.h"
 #include "wx/intl.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)
+
 wxChoiceXmlHandler::wxChoiceXmlHandler() 
 : wxXmlResourceHandler() , m_insideBox(FALSE)
 {
@@ -77,7 +79,10 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
         // handle <item>Label</item>
         
         // add to the list
-        strList.Add(wxGetTranslation(GetNodeContent(m_node)));
+        wxString str = GetNodeContent(m_node);
+        if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
+            str = wxGetTranslation(str);
+        strList.Add(str);
 
         return NULL;
     }