mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 07:45:58 +08:00
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:
parent
11f7f521c9
commit
3d4b626c50
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user