Qt ConfirmTxDialog: disconnect timer when closing dialog
fixes https://github.com/spesmilo/electrum/issues/6791
This commit is contained in:
@@ -67,6 +67,9 @@ class TxEditor:
|
|||||||
self.update()
|
self.update()
|
||||||
self.needs_update = False
|
self.needs_update = False
|
||||||
|
|
||||||
|
def stop_editor_updates(self):
|
||||||
|
self.main_window.gui_object.timer.timeout.disconnect(self.timer_actions)
|
||||||
|
|
||||||
def fee_slider_callback(self, dyn, pos, fee_rate):
|
def fee_slider_callback(self, dyn, pos, fee_rate):
|
||||||
if dyn:
|
if dyn:
|
||||||
if self.config.use_mempool_fees():
|
if self.config.use_mempool_fees():
|
||||||
@@ -193,6 +196,7 @@ class ConfirmTxDialog(TxEditor, WindowModalDialog):
|
|||||||
def run(self):
|
def run(self):
|
||||||
cancelled = not self.exec_()
|
cancelled = not self.exec_()
|
||||||
password = self.pw.text() or None
|
password = self.pw.text() or None
|
||||||
|
self.stop_editor_updates()
|
||||||
self.deleteLater() # see #3956
|
self.deleteLater() # see #3956
|
||||||
return cancelled, self.is_send, password, self.tx
|
return cancelled, self.is_send, password, self.tx
|
||||||
|
|
||||||
|
|||||||
@@ -989,6 +989,7 @@ class PreviewTxDialog(BaseTxDialog, TxEditor):
|
|||||||
return
|
return
|
||||||
assert self.tx
|
assert self.tx
|
||||||
self.finalized = True
|
self.finalized = True
|
||||||
|
self.stop_editor_updates()
|
||||||
self.tx.set_rbf(self.rbf_cb.isChecked())
|
self.tx.set_rbf(self.rbf_cb.isChecked())
|
||||||
locktime = self.locktime_e.get_locktime()
|
locktime = self.locktime_e.get_locktime()
|
||||||
if locktime is not None:
|
if locktime is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user