mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Only stop the camera if the timer is actually running
CURA-4081
This commit is contained in:
parent
4564b2a843
commit
a8a475a1a7
1 changed files with 10 additions and 9 deletions
|
@ -313,15 +313,16 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _stopCamera(self):
|
def _stopCamera(self):
|
||||||
self._camera_timer.stop()
|
if self._camera_timer.isActive():
|
||||||
if self._image_reply:
|
self._camera_timer.stop()
|
||||||
try:
|
if self._image_reply:
|
||||||
self._image_reply.abort()
|
try:
|
||||||
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
self._image_reply.abort()
|
||||||
except RuntimeError:
|
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
||||||
pass # It can happen that the wrapped c++ object is already deleted.
|
except RuntimeError:
|
||||||
self._image_reply = None
|
pass # It can happen that the wrapped c++ object is already deleted.
|
||||||
self._image_request = None
|
self._image_reply = None
|
||||||
|
self._image_request = None
|
||||||
|
|
||||||
def _startCamera(self):
|
def _startCamera(self):
|
||||||
if self._use_stream:
|
if self._use_stream:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue