Browse Source

wxGUI: NewIdRef was added only in wxPython 4.0.3. Fix import for <4.0.3 (#155)

Māris Nartišs 5 years ago
parent
commit
481e97bcc0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      gui/wxpython/gui_core/wrap.py

+ 2 - 2
gui/wxpython/gui_core/wrap.py

@@ -23,7 +23,7 @@ try:
 except ImportError:
     import wx.lib.customtreectrl as CT
 
-from core.globalvar import gtk3, wxPythonPhoenix
+from core.globalvar import gtk3, wxPythonPhoenix, CheckWxVersion
 if wxPythonPhoenix:
     import wx.adv
 
@@ -35,7 +35,7 @@ else:
     ComboPopup = wx.combo.ComboPopup
     wxComboCtrl = wx.combo.ComboCtrl
 
-if wxPythonPhoenix:
+if wxPythonPhoenix and CheckWxVersion([4, 0, 3, 0]):
     from wx import NewIdRef as NewId
 else:
     from wx import NewId