mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Prevent crash when releasing released lock
CURA-C2
This commit is contained in:
parent
c6dfb6e4cf
commit
6df2f84c07
1 changed files with 10 additions and 2 deletions
|
@ -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()
|
||||||
self._ui_lock.release()
|
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()
|
@pyqtSlot()
|
||||||
def onCancelButtonClicked(self):
|
def onCancelButtonClicked(self):
|
||||||
self._cancelled = True
|
self._cancelled = True
|
||||||
self._ui_view.close()
|
self._ui_view.close()
|
||||||
self._ui_lock.release()
|
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)
|
@pyqtSlot(str)
|
||||||
def onWidthChanged(self, value):
|
def onWidthChanged(self, value):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue