URI: 
       ttx_dialog: prompt if signed but not saved - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit c0295c767ec512084ca1f0c00534bf01954dc161
   DIR parent 268dcbcac5a1e7ee650dad0849323f9546cd3459
  HTML Author: Neil Booth <kyuupichan@gmail.com>
       Date:   Mon, 25 Jan 2016 19:26:02 +0900
       
       ttx_dialog: prompt if signed but not saved
       
       I've lost a signed TX one too many times now
       
       Diffstat:
         M gui/qt/transaction_dialog.py        |       7 +++----
       
       1 file changed, 3 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py
       t@@ -51,7 +51,6 @@ class TxDialog(QDialog, MessageBoxMixin):
                self.wallet = parent.wallet
                self.prompt_if_unsaved = prompt_if_unsaved
                self.saved = False
       -        self.broadcast = False
                self.desc = desc
        
                self.setMinimumWidth(660)
       t@@ -121,11 +120,11 @@ class TxDialog(QDialog, MessageBoxMixin):
                    self.main_window.broadcast_transaction(self.tx, self.desc)
                finally:
                    self.main_window.pop_top_level_window(self)
       -        self.broadcast = True
       +        self.saved = True
                self.update()
        
            def closeEvent(self, event):
       -        if (self.prompt_if_unsaved and not self.saved and not self.broadcast
       +        if (self.prompt_if_unsaved and not self.saved
                    and not self.question(_('This transaction is not saved. Close anyway?'), title=_("Warning"))):
                    event.ignore()
                else:
       t@@ -146,7 +145,7 @@ class TxDialog(QDialog, MessageBoxMixin):
                    self.sign_button.setDisabled(False)
                    self.main_window.pop_top_level_window(self)
                    if success:
       -                self.prompt_if_unsaved = False
       +                self.prompt_if_unsaved = True
                        self.saved = False
                        self.update()