commit f38ec93ae9555f6df47547baa92b13013b3cf18c
parent 6ccd83397ceb5885c3b60ada55679c62a3c5cb16
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 14 Sep 2018 23:07:13 +0200
qt fx settings: restore selected exchange in combobox if list changes
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
@@ -661,7 +661,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.do_update_fee()
self.require_fee_update = False
self.notify_transactions()
-
def format_amount(self, x, is_diff=False, whitespaces=False):
return format_satoshis(x, self.num_zeros, self.decimal_point, is_diff=is_diff, whitespaces=whitespaces)
@@ -2273,8 +2272,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
try:
public_key = ecc.ECPubkey(bfh(pubkey_e.text()))
except BaseException as e:
- traceback.print_exc(file=sys.stdout)
- self.show_warning(_('Invalid Public key'))
+ traceback.print_exc(file=sys.stdout)
+ self.show_warning(_('Invalid Public key'))
return
encrypted = public_key.encrypt_message(message)
encrypted_e.setText(encrypted.decode('ascii'))
@@ -2936,9 +2935,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
exchanges = self.fx.get_exchanges_by_ccy(c, h)
else:
exchanges = self.fx.get_exchanges_by_ccy('USD', False)
+ ex_combo.blockSignals(True)
ex_combo.clear()
ex_combo.addItems(sorted(exchanges))
ex_combo.setCurrentIndex(ex_combo.findText(self.fx.config_exchange()))
+ ex_combo.blockSignals(False)
def on_currency(hh):
if not self.fx: return