The reinit of the stock objects shoudl not happen when wxPython is
embedded in a C++ wx application git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2620b36e03
commit
70e45c91bb
@ -723,6 +723,16 @@ void wxPy_ReinitStockObjects(int pass)
|
||||
else if (pass == 2) { rsoPass2(#name); } \
|
||||
else if (pass == 3) { rsoPass3(#name, #classname, (void*)&name); }
|
||||
|
||||
// If there is already an App object then wxPython is probably embedded in
|
||||
// a wx C++ application, so there is no need to do all this.
|
||||
static bool embedded = false;
|
||||
if ((pass == 1 || pass == 2) && wxTheApp) {
|
||||
embedded = true;
|
||||
return;
|
||||
}
|
||||
if (pass == 3 && embedded)
|
||||
return;
|
||||
|
||||
|
||||
REINITOBJ(wxNORMAL_FONT, wxFont);
|
||||
REINITOBJ(wxSMALL_FONT, wxFont);
|
||||
|
Loading…
Reference in New Issue
Block a user