mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Fix icon handling in vote result table, fix #2141
This commit is contained in:
parent
5cc3c57d52
commit
9fc76a4cfc
@ -701,21 +701,14 @@ public class VoteResultView extends ActivatableView<GridPane, Void> implements D
|
||||
public TableCell<ProposalListItem, ProposalListItem> call(TableColumn<ProposalListItem,
|
||||
ProposalListItem> column) {
|
||||
return new TableCell<>() {
|
||||
Label myVoteIcon;
|
||||
|
||||
@Override
|
||||
public void updateItem(final ProposalListItem item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
|
||||
if (item != null && !empty) {
|
||||
if (myVoteIcon == null) {
|
||||
myVoteIcon = item.getMyVoteIcon();
|
||||
setGraphic(myVoteIcon);
|
||||
}
|
||||
setGraphic(item.getMyVoteIcon());
|
||||
} else {
|
||||
setGraphic(null);
|
||||
if (myVoteIcon != null)
|
||||
myVoteIcon = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -734,21 +727,17 @@ public class VoteResultView extends ActivatableView<GridPane, Void> implements D
|
||||
public TableCell<ProposalListItem, ProposalListItem> call(TableColumn<ProposalListItem,
|
||||
ProposalListItem> column) {
|
||||
return new TableCell<>() {
|
||||
Label icon;
|
||||
|
||||
@Override
|
||||
public void updateItem(final ProposalListItem item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
|
||||
if (item != null && !empty) {
|
||||
icon = new Label();
|
||||
Label icon = new Label();
|
||||
AwesomeDude.setIcon(icon, item.getIcon());
|
||||
icon.getStyleClass().add(item.getColorStyleClass());
|
||||
setGraphic(icon);
|
||||
} else {
|
||||
setGraphic(null);
|
||||
if (icon != null)
|
||||
icon = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user