mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Merge pull request #2108 from ManfredKarrer/fix-missing-layout-update
Fix missing render update issue
This commit is contained in:
commit
63b7c2c75d
1 changed files with 9 additions and 4 deletions
|
@ -813,10 +813,15 @@ public class GUIUtil {
|
|||
int maxHeight = rowHeight * maxNumRows + headerHeight;
|
||||
checkArgument(maxHeight >= minHeight, "maxHeight cannot be smaller as minHeight");
|
||||
int height = Math.min(maxHeight, Math.max(minHeight, size * rowHeight + headerHeight));
|
||||
tableView.setMaxHeight(-1);
|
||||
tableView.setMinHeight(-1);
|
||||
tableView.setMaxHeight(height);
|
||||
tableView.setMinHeight(height);
|
||||
|
||||
tableView.setPrefHeight(-1);
|
||||
tableView.setVisible(false);
|
||||
// We need to delay the setter to the next render frame as otherwise views don' get updated in some cases
|
||||
// Not 100% clear what causes that issue, but seems the requestLayout method is not called otherwise
|
||||
UserThread.execute(() -> {
|
||||
tableView.setPrefHeight(height);
|
||||
tableView.setVisible(true);
|
||||
});
|
||||
}
|
||||
|
||||
public static Tuple2<ComboBox<TradeCurrency>, Integer> addRegionCountryTradeCurrencyComboBoxes(GridPane gridPane,
|
||||
|
|
Loading…
Add table
Reference in a new issue