From 3d4b626c50f7013fea729b1c3da4f0ba5cac92e8 Mon Sep 17 00:00:00 2001 From: daid Date: Wed, 9 Dec 2015 10:40:09 +0100 Subject: [PATCH] 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. --- cura/CuraSplashScreen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/CuraSplashScreen.py b/cura/CuraSplashScreen.py index d2f9ad8d61..68cfaeb355 100644 --- a/cura/CuraSplashScreen.py +++ b/cura/CuraSplashScreen.py @@ -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)