X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43840d8b3a23d87a589655c3e0d529c346a6907d..27d2f680a7d16b7489e445e00c3324a45d0d0b28:/src/xrc/xmlres.cpp diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 4aa3658c3d..870363db17 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -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; }