commit e7d24c31bd4965a4b9f4c86dd39cf4f887e89a9f
parent 17006e5285cb45a444c232beb536fa1723a4a8e7
Author: ThomasV <thomasv@gitorious>
Date: Fri, 19 Sep 2014 11:14:16 +0200
don't set negative amounts in amount field
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -933,7 +933,7 @@ class ElectrumWindow(QMainWindow):
output = ('address', addr, sendable)
dummy_tx = Transaction(inputs, [output])
fee = self.wallet.estimated_fee(dummy_tx)
- self.amount_e.setAmount(sendable-fee)
+ self.amount_e.setAmount(max(0,sendable-fee))
self.amount_e.textEdited.emit("")
self.fee_e.setAmount(fee)