When running Cura from the master branch, there is no version set. Which puts the version at "master". The splash screen tries to split this into major-minor, but cannot draw the minor and throws an exception. This patch just skips drawing of the minor version number when it is not available.

This commit is contained in:
daid 2015-12-09 10:40:09 +01:00
parent 11f7f521c9
commit 3d4b626c50

View file

@ -21,8 +21,9 @@ class CuraSplashScreen(QSplashScreen):
painter.setFont(QFont("Roboto", 20))
painter.drawText(0, 0, 203, 230, Qt.AlignRight | Qt.AlignBottom, version[0])
painter.setFont(QFont("Roboto", 12))
painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1])
if len(version) > 1:
painter.setFont(QFont("Roboto", 12))
painter.drawText(0, 0, 203, 255, Qt.AlignRight | Qt.AlignBottom, version[1])
painter.restore()
super().drawContents(painter)