fix ui bug with not updated offer direction

This commit is contained in:
Manfred Karrer 2015-12-31 12:57:27 +01:00
parent 91761ade14
commit 7dc08b0459
5 changed files with 8 additions and 9 deletions

View file

@ -82,10 +82,6 @@ public class BitsquareApp extends Application {
private Injector injector;
private boolean popupOpened;
public static Stage getPrimaryStage() {
return primaryStage;
}
private static Stage primaryStage;
private Scene scene;
private final List<String> corruptedDatabaseFiles = new ArrayList<>();

View file

@ -262,6 +262,8 @@ public class PendingTradesDataModel extends ActivatableDataModel {
}
public Offer.Direction getDirection(Offer offer) {
// gets called earlier than onSelectTrade event handler
isOfferer = tradeManager.isMyOffer(offer);
return isOfferer ? offer.getDirection() : offer.getMirroredDirection();
}

View file

@ -76,11 +76,11 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
@Override
public void initialize() {
setTradeIdColumnCellFactory();
setDirectionColumnCellFactory();
setDateColumnCellFactory();
setAmountColumnCellFactory();
setPriceColumnCellFactory();
setVolumeColumnCellFactory();
setDateColumnCellFactory();
setDirectionColumnCellFactory();
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
table.setPlaceholder(new Label("No pending trades available"));