mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:39:01 +08:00
Prevent crash when releasing released lock
CURA-C2
This commit is contained in:
parent
c6dfb6e4cf
commit
6df2f84c07
@ -92,13 +92,21 @@ class ImageReaderUI(QObject):
|
|||||||
def onOkButtonClicked(self):
|
def onOkButtonClicked(self):
|
||||||
self._cancelled = False
|
self._cancelled = False
|
||||||
self._ui_view.close()
|
self._ui_view.close()
|
||||||
|
try:
|
||||||
self._ui_lock.release()
|
self._ui_lock.release()
|
||||||
|
except RuntimeError:
|
||||||
|
# We don't really care if it was held or not. Just make sure it's not held now
|
||||||
|
pass
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def onCancelButtonClicked(self):
|
def onCancelButtonClicked(self):
|
||||||
self._cancelled = True
|
self._cancelled = True
|
||||||
self._ui_view.close()
|
self._ui_view.close()
|
||||||
|
try:
|
||||||
self._ui_lock.release()
|
self._ui_lock.release()
|
||||||
|
except RuntimeError:
|
||||||
|
# We don't really care if it was held or not. Just make sure it's not held now
|
||||||
|
pass
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def onWidthChanged(self, value):
|
def onWidthChanged(self, value):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user