]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / xrc / xmlres.cpp
index 4aa3658c3d77313a49d96064c259361582152125..870363db17f550594d542646d3071a7bade50b57 100644 (file)
@@ -1455,8 +1455,18 @@ static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = -2)
     return (*rec_var)->id;
 }
 
+static void AddStdXRCID_Records();
+
 /*static*/ int wxXmlResource::GetXRCID(const wxChar *str_id)
 {
+    static bool s_stdIDsAdded = false;
+
+    if ( !s_stdIDsAdded )
+    {
+        s_stdIDsAdded = true;
+        AddStdXRCID_Records();
+    }
+
     return XRCID_Lookup(str_id);
 }
 
@@ -1601,7 +1611,6 @@ public:
     wxXmlResourceModule() {}
     bool OnInit()
     {
-        AddStdXRCID_Records();
         wxXmlResource::AddSubclassFactory(new wxXmlSubclassFactoryCXX);
         return true;
     }