Removed spinner as it caused the crash

We might want to consider getting the spinner back, but for the moment it's best left out

CURA-4343
This commit is contained in:
Jaime van Kessel 2017-09-19 09:43:35 +02:00
parent d5c9ebd58a
commit d49e84830b

View File

@ -24,18 +24,10 @@ class CuraSplashScreen(QSplashScreen):
self._loading_image_rotation_angle = 0
self._to_stop = False
self._loading_tick_thread = LoadingTickThread(self)
def show(self):
super().show()
self._loading_tick_thread.start()
def updateLoadingImage(self):
if self._to_stop:
return
self._loading_image_rotation_angle -= 10
self.repaint()
self._to_stop = False
def drawContents(self, painter):
if self._to_stop:
@ -63,13 +55,6 @@ class CuraSplashScreen(QSplashScreen):
painter.drawText(252, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1])
painter.setPen(QColor(255, 255, 255, 255))
# draw the loading image
pen = QPen()
pen.setWidth(6 * self._scale)
pen.setColor(QColor(32, 166, 219, 255))
painter.setPen(pen)
painter.drawArc(60, 150, 32 * self._scale, 32 * self._scale, self._loading_image_rotation_angle * 16, 300 * 16)
# draw message text
if self._current_message:
font = QFont() # Using system-default font here
@ -97,27 +82,4 @@ class CuraSplashScreen(QSplashScreen):
def close(self):
# set stop flags
self._to_stop = True
self._loading_tick_thread.setToStop()
super().close()
class LoadingTickThread(Thread):
def __init__(self, splash):
super().__init__(daemon = True)
self._splash = splash
self._to_stop = False
self._time_interval = 0.1
self._event = Event()
def setToStop(self):
self._to_stop = True
self._event.set()
def run(self):
while not self._to_stop:
self._event.wait(self._time_interval)
if self._event.is_set():
break
self._splash.updateLoadingImage()