chiark / gitweb /
Check wxPython version and require a minimum version of 3.0
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Thu, 29 Oct 2015 18:01:10 +0000 (14:01 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Thu, 29 Oct 2015 18:03:00 +0000 (14:03 -0400)
Fixes T270 and a whole bunch of other bugs such as T310 for example

Cura/gui/app.py

index 9e5e8de66dc90e8376f057e1eb98e5397699f432..4aade3335391f00d9d114c33e1f81151b7852ba1 100644 (file)
@@ -114,9 +114,15 @@ class CuraApp(wx.App):
                from Cura.util import profile
                from Cura.util import resources
                from Cura.util import version
+               from distutils.version import LooseVersion
 
                resources.setupLocalization(profile.getPreference('language'))  # it's important to set up localization at very beginning to install _
 
+               if LooseVersion(wx.__version__) < LooseVersion('3.0'):
+                       wx.MessageBox(_("This version of Cura requires WxPython version 3.0 or newer.\nYour current WxPython version is %s.") % wx.__version__,
+                                                 _("WxPython version is too old"), wx.OK | wx.ICON_ERROR)
+                       return
+
                #If we do not have preferences yet, try to load it from a previous Cura install
                if profile.getMachineSetting('machine_type') == 'unknown':
                        try: