mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
qt fx settings: restore selected exchange in combobox if list changes
This commit is contained in:
parent
6ccd83397c
commit
f38ec93ae9
1 changed files with 4 additions and 3 deletions
|
@ -662,7 +662,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
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)
|
||||
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue