URI: 
       tQt send tab: disable "max" button for invoices - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 39215b43b9192e4707c22609489ce70c70c1e647
   DIR parent 10f037c40c5a6cedeba982da748937e5622762b3
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Mon,  2 Jul 2018 02:41:34 +0200
       
       Qt send tab: disable "max" button for invoices
       
       Diffstat:
         M gui/qt/main_window.py               |       8 +++++---
       
       1 file changed, 5 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -1209,9 +1209,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
                self.payto_e.textChanged.connect(self.update_fee)
                self.amount_e.textEdited.connect(self.update_fee)
        
       -        def reset_max(t):
       +        def reset_max(text):
                    self.is_max = False
       -            self.max_button.setEnabled(not bool(t))
       +            enable = not bool(text) and not self.amount_e.isReadOnly()
       +            self.max_button.setEnabled(enable)
                self.amount_e.textEdited.connect(reset_max)
                self.fiat_send_e.textEdited.connect(reset_max)
        
       t@@ -1656,8 +1657,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
            def prepare_for_payment_request(self):
                self.show_send_tab()
                self.payto_e.is_pr = True
       -        for e in [self.payto_e, self.amount_e, self.message_e]:
       +        for e in [self.payto_e, self.message_e]:
                    e.setFrozen(True)
       +        self.lock_amount(True)
                self.payto_e.setText(_("please wait..."))
                return True