electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8cc8f8a5e1fe2313163de53a0c4590c4a1b250a9
parent ae730cc8e5be921b92fe45652c35f2031dccfb4a
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 19 Apr 2017 11:43:36 +0200

disable max button if an amount has been typed

Diffstat:
Mgui/qt/main_window.py | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -1065,7 +1065,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.amount_e.shortcut.connect(self.spend_max) self.payto_e.textChanged.connect(self.update_fee) self.amount_e.textEdited.connect(self.update_fee) - self.amount_e.textEdited.connect(self.reset_max) + + def reset_max(t): + self.is_max = False + self.max_button.setEnabled(not bool(t)) + self.amount_e.textEdited.connect(reset_max) + self.fiat_send_e.textEdited.connect(reset_max) def entry_changed(): text = "" @@ -1113,9 +1118,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.is_max = True self.do_update_fee() - def reset_max(self): - self.is_max = False - def update_fee(self): self.require_fee_update = True