avatar reset bug fixed
This commit is contained in:
parent
89c4b2cdf6
commit
ac1800703f
1 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,7 @@ TOX_FILE_TRANSFER_STATE = {
|
||||||
|
|
||||||
|
|
||||||
class StateSignal(QtCore.QObject):
|
class StateSignal(QtCore.QObject):
|
||||||
signal = QtCore.Signal(int, float)
|
signal = QtCore.Signal(int, float) # state and progress
|
||||||
|
|
||||||
|
|
||||||
class FileTransfer(QtCore.QObject):
|
class FileTransfer(QtCore.QObject):
|
||||||
|
@ -98,7 +98,8 @@ class SendTransfer(FileTransfer):
|
||||||
self._done += size
|
self._done += size
|
||||||
self._state_changed.signal.emit(self.state, self._done / self._size)
|
self._state_changed.signal.emit(self.state, self._done / self._size)
|
||||||
else:
|
else:
|
||||||
self._file.close()
|
if hasattr(self, '_file'):
|
||||||
|
self._file.close()
|
||||||
self.state = TOX_FILE_TRANSFER_STATE['FINISHED']
|
self.state = TOX_FILE_TRANSFER_STATE['FINISHED']
|
||||||
self._state_changed.signal.emit(self.state, 1)
|
self._state_changed.signal.emit(self.state, 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue