fix sorting on buy > amount column (

This commit is contained in:
niyid 2024-10-31 20:06:14 +01:00 committed by GitHub
parent 6b91b057e5
commit c855d66a0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -366,7 +366,6 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
matchingOffersToggle.disableProperty().bind(model.disableMatchToggle); matchingOffersToggle.disableProperty().bind(model.disableMatchToggle);
matchingOffersToggle.setOnAction(e -> model.onShowOffersMatchingMyAccounts(matchingOffersToggle.isSelected())); matchingOffersToggle.setOnAction(e -> model.onShowOffersMatchingMyAccounts(matchingOffersToggle.isSelected()));
volumeColumn.sortableProperty().bind(model.showAllTradeCurrenciesProperty.not());
model.getOfferList().comparatorProperty().bind(tableView.comparatorProperty()); model.getOfferList().comparatorProperty().bind(tableView.comparatorProperty());
amountColumn.sortTypeProperty().addListener((observable, oldValue, newValue) -> { amountColumn.sortTypeProperty().addListener((observable, oldValue, newValue) -> {
@ -775,6 +774,7 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
private AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> getAmountColumn() { private AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> getAmountColumn() {
AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> column = new AutoTooltipTableColumn<>(Res.get("shared.XMRMinMax"), Res.get("shared.amountHelp")); AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> column = new AutoTooltipTableColumn<>(Res.get("shared.XMRMinMax"), Res.get("shared.amountHelp"));
column.setMinWidth(100); column.setMinWidth(100);
column.setSortable(true);
column.getStyleClass().add("number-column"); column.getStyleClass().add("number-column");
column.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue())); column.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
column.setCellFactory( column.setCellFactory(
@ -918,6 +918,7 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> column = new AutoTooltipTableColumn<>("") { AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> column = new AutoTooltipTableColumn<>("") {
{ {
setMinWidth(125); setMinWidth(125);
setSortable(true);
} }
}; };
column.getStyleClass().add("number-column"); column.getStyleClass().add("number-column");