Work around wxPython / wxPropertyGrid fighting over global state

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13280
This commit is contained in:
Jon Evans 2023-01-21 17:06:44 -05:00
parent 241dc0d96b
commit 70ec2f990f
1 changed files with 6 additions and 0 deletions

View File

@ -100,6 +100,12 @@ wx_version = ""
try:
from wx import version
wx_version = version()
# Import wx modules that re-initialize wx globals, because they break wxPropertyGrid
# (and probably some other stuff) if we let this happen after we already have started
# mutating those globals.
import wx.adv, wx.html, wx.richtext
except:
pass
)", pybind11::globals(), locals );