tkivy: fix amount edit - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 525e08af5405c5406ed1953d676d69dc7915c6af DIR parent 5bbffb0cbf080620b4a856334cc9e4288b199b34 HTML Author: ThomasV <thomasv@electrum.org> Date: Fri, 30 Oct 2015 13:26:37 +0100 kivy: fix amount edit Diffstat: M gui/kivy/main_window.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -443,9 +443,13 @@ class ElectrumWindow(App): def update_amount(self, amount, c): if c == '<': return amount[:-1] + if c == '.' and amount == '': + return '0.' + if c == '0' and amount == '0': + return '0' try: - s = amount + c - amount = s if Decimal(s)!=0 else '' + Decimal(amount+c) + amount += c except: pass return amount