electrum

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

commit 21ad805010f4c6308763d1d034d5af98abfc6565
parent df6dae90d6ecc54f990d0cbfe116708c96d57fd5
Author: ThomasV <thomasv@electrum.org>
Date:   Thu,  6 Oct 2016 10:26:16 +0200

fix #1953

Diffstat:
Mgui/qt/main_window.py | 18+++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -102,6 +102,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.tray = gui_object.tray self.app = gui_object.app self.cleaned_up = False + self.is_max = False self.create_status_bar() self.need_update = threading.Event() @@ -156,7 +157,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): # set initial message self.console.showMessage(self.network.banner) - self.is_max = False self.payment_request = None self.checking_accounts = False self.qr_window = None @@ -905,21 +905,17 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.fee_slider.setToolTip('') def slider_moved(): from electrum.util import fee_levels - i = self.fee_slider.sliderPosition() - tooltip = fee_levels[i] + pos = self.fee_slider.sliderPosition() + self.config.set_key('fee_level', pos, False) + self.spend_max() if self.is_max else self.update_fee() + tooltip = fee_levels[pos] if self.network: - dynfee = self.network.dynfee(i) + dynfee = self.network.dynfee(pos) if dynfee: tooltip += '\n' + self.format_amount(dynfee) + ' ' + self.base_unit() + '/kB' QToolTip.showText(QCursor.pos(), tooltip, self.fee_slider) - def slider_released(): - self.config.set_key('fee_level', self.fee_slider.sliderPosition(), False) - if self.is_max: - self.spend_max() - else: - self.update_fee() + self.fee_slider.valueChanged.connect(slider_moved) - self.fee_slider.sliderReleased.connect(slider_released) self.fee_slider.setValue(self.config.get('fee_level', 2)) self.fee_e = BTCAmountEdit(self.get_decimal_point)