Prevent to open wrong info popup when it is your own offer

This commit is contained in:
Christoph Atteneder 2021-07-16 09:23:45 +02:00
parent 31b08618fd
commit fdfcd06eab
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B

View File

@ -1052,11 +1052,13 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
tableRow.setOnMousePressed(null);
} else {
button.setDefaultButton(false);
tableRow.setOnMousePressed(e -> {
// ugly hack to get the icon clickable when deactivated
if (!(e.getTarget() instanceof ImageView || e.getTarget() instanceof Canvas))
onShowInfo(offer, canTakeOfferResult);
});
if (!myOffer) {
tableRow.setOnMousePressed(e -> {
// ugly hack to get the icon clickable when deactivated
if (!(e.getTarget() instanceof ImageView || e.getTarget() instanceof Canvas))
onShowInfo(offer, canTakeOfferResult);
});
}
}
}