mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:38:59 +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):
|
||||
self._cancelled = False
|
||||
self._ui_view.close()
|
||||
try:
|
||||
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()
|
||||
def onCancelButtonClicked(self):
|
||||
self._cancelled = True
|
||||
self._ui_view.close()
|
||||
try:
|
||||
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)
|
||||
def onWidthChanged(self, value):
|
||||
|
Loading…
x
Reference in New Issue
Block a user