mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 16:27:51 -06:00
Fix 'OverflowError' (defensive coding).
should fix sentry#CURA-1EB
This commit is contained in:
parent
b660885a58
commit
f0a7205267
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
# Copyright (c) 2020 Ultimaker B.V.
|
||||
# Uranium is released under the terms of the LGPLv3 or higher.
|
||||
import math
|
||||
|
||||
from PyQt6.QtCore import Qt, QCoreApplication, QTimer
|
||||
from PyQt6.QtGui import QPixmap, QColor, QFont, QPen, QPainter
|
||||
|
@ -51,6 +52,7 @@ class CuraSplashScreen(QSplashScreen):
|
|||
self._last_update_time = time.time()
|
||||
# Since we don't know how much time actually passed, check how many intervals of 50 we had.
|
||||
self._loading_image_rotation_angle -= 10 * (time_since_last_update * 1000 / 50)
|
||||
self._loading_image_rotation_angle = math.fmod(self._loading_image_rotation_angle, 360)
|
||||
self.repaint()
|
||||
|
||||
# Override the mousePressEvent so the splashscreen doesn't disappear when clicked
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue