Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix preferences view combobox selection #1774

Conversation

devinbileck
Copy link
Member

Relates to #1771.

Regarding the ComboBoxes for adding currencies and altcoins in the preferences view:

  • Fix for using arrow keys to navigate the ComboBox adding the first option.
  • Fix prompt text no longer appearing after selecting an option.
  • Fix option not sorted when added back to the ComboBox.

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.
After selecting an option from the combobox, it would no longer
display the prompt text and instead would be blank.

As per the documentation
https://docs.oracle.com/javase/10/docs/api/javafx/scene/control/ComboBoxBase.html#promptTextProperty:
> Prompt text is not displayed in all circumstances, it is dependent
> upon the subclasses of ComboBoxBase to clarify when promptText will be
> shown.

Therefore, use a custom buttonCell on the combo box to display the
prompt text.
When removing a previously selected fiat or crypto currency, it was
adding it back to the bottom of the combobox rather than alphabetically.
So make sure to sort when adding a currency to the list.
@ripcurlx
Copy link
Contributor

ACK - Thanks for the fix @devinbileck!

@ripcurlx ripcurlx merged commit ad5e232 into bisq-network:master Oct 16, 2018
@devinbileck devinbileck deleted the fix-preferences-view-combobox-selection branch October 16, 2018 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants