electrum

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

commit 0dfaf9b97013ce9221bc8589ad806e52643e727d
parent 6f843a7bb68ba6f20552914c3d71046de2e4277a
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 16 Jan 2018 22:32:30 +0100

Merge pull request #3736 from bauerj/issue-1795

Change number of zero when base unit changes
Diffstat:
Mgui/qt/main_window.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -2736,7 +2736,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): unit_combo = QComboBox() unit_combo.addItems(units) unit_combo.setCurrentIndex(units.index(self.base_unit())) - def on_unit(x): + def on_unit(x, nz): unit_result = units[unit_combo.currentIndex()] if self.base_unit() == unit_result: return @@ -2751,13 +2751,14 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): else: raise Exception('Unknown base unit') self.config.set_key('decimal_point', self.decimal_point, True) + nz.setMaximum(self.decimal_point) self.history_list.update() self.request_list.update() self.address_list.update() for edit, amount in zip(edits, amounts): edit.setAmount(amount) self.update_status() - unit_combo.currentIndexChanged.connect(on_unit) + unit_combo.currentIndexChanged.connect(lambda x: on_unit(x, nz)) gui_widgets.append((unit_label, unit_combo)) block_explorers = sorted(util.block_explorer_info().keys())