Commit 6484ce45255d78c191b13a80c15e93ec4d72812c

Authored by Thiago Franco de Moraes
1 parent 62eddbf8
Exists in master

Aboutdialog was not working with wxpython4

Showing 1 changed file with 8 additions and 3 deletions   Show diff stats
invesalius/gui/dialogs.py
... ... @@ -45,6 +45,11 @@ from wx.lib.agw import floatspin
45 45 from wx.lib.wordwrap import wordwrap
46 46 from wx.lib.pubsub import pub as Publisher
47 47  
  48 +try:
  49 + from wx.adv import AboutDialogInfo, AboutBox
  50 +except ImportError:
  51 + from wx import AboutDialogInfo, AboutBox
  52 +
48 53 import invesalius.constants as const
49 54 import invesalius.data.coordinates as dco
50 55 import invesalius.gui.widgets.gradient as grad
... ... @@ -1222,7 +1227,7 @@ def SaveChangesDialog2(filename):
1222 1227  
1223 1228 def ShowAboutDialog(parent):
1224 1229  
1225   - info = wx.AboutDialogInfo()
  1230 + info = AboutDialogInfo()
1226 1231 info.Name = "InVesalius"
1227 1232 info.Version = "3.1.1"
1228 1233 info.Copyright = _("(c) 2007-2017 Center for Information Technology Renato Archer - CTI")
... ... @@ -1283,8 +1288,8 @@ def ShowAboutDialog(parent):
1283 1288  
1284 1289 info.Artists = [u"Otavio Henrique Junqueira Amorim"]
1285 1290  
1286   - # Then we call wx.AboutBox providing its info object
1287   - wx.AboutBox(info)
  1291 + # Then we call AboutBox providing its info object
  1292 + AboutBox(info)
1288 1293  
1289 1294  
1290 1295 def ShowSavePresetDialog(default_filename="raycasting"):
... ...