mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Fix combobox selection using arrow keys
Utilize the onHiding event rather than onAction event to prevent the first option from being added when using arrow keys to navigate the combobox. This will add the selected option when the combobox is closing.
This commit is contained in:
parent
56965c1904
commit
313971d7d8
1 changed files with 2 additions and 2 deletions
|
@ -604,7 +604,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
|||
|
||||
fiatCurrenciesComboBox.setItems(allFiatCurrencies);
|
||||
fiatCurrenciesListView.setItems(fiatCurrencies);
|
||||
fiatCurrenciesComboBox.setOnAction(e -> {
|
||||
fiatCurrenciesComboBox.setOnHiding(e -> {
|
||||
FiatCurrency selectedItem = fiatCurrenciesComboBox.getSelectionModel().getSelectedItem();
|
||||
if (selectedItem != null) {
|
||||
preferences.addFiatCurrency(selectedItem);
|
||||
|
@ -619,7 +619,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
|||
});
|
||||
cryptoCurrenciesComboBox.setItems(allCryptoCurrencies);
|
||||
cryptoCurrenciesListView.setItems(cryptoCurrencies);
|
||||
cryptoCurrenciesComboBox.setOnAction(e -> {
|
||||
cryptoCurrenciesComboBox.setOnHiding(e -> {
|
||||
CryptoCurrency selectedItem = cryptoCurrenciesComboBox.getSelectionModel().getSelectedItem();
|
||||
if (selectedItem != null) {
|
||||
preferences.addCryptoCurrency(selectedItem);
|
||||
|
|
Loading…
Add table
Reference in a new issue