1
0

Qt: disable max button if amount is locked

This commit is contained in:
ThomasV
2016-06-07 11:38:23 +02:00
parent cb9a636616
commit 017afd95dc
2 changed files with 9 additions and 20 deletions

View File

@@ -894,9 +894,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
grid.addWidget(amount_label, 4, 0)
grid.addWidget(self.amount_e, 4, 1)
max_button = EnterButton(_("Max"), self.spend_max)
self.max_button = EnterButton(_("Max"), self.spend_max)
hbox = QHBoxLayout()
hbox.addWidget(max_button)
hbox.addWidget(self.max_button)
hbox.addStretch(1)
grid.addLayout(hbox, 4, 3)
@@ -1303,6 +1303,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
dialog.exec_()
return clayout.selected_index()
def lock_amount(self, b):
self.amount_e.setFrozen(b)
self.max_button.setEnabled(not b)
def prepare_for_payment_request(self):
self.tabs.setCurrentIndex(1)
self.payto_e.is_pr = True