From 70be5916b5570ca85ccdc4eea58b3206ec1eee3f Mon Sep 17 00:00:00 2001 From: GoldenGnu Date: Tue, 29 Oct 2024 17:37:23 +0100 Subject: [PATCH] Bug Fix: Stockpiles collapsing after adding item (Issue #497) --- .../tabs/stockpile/StockpileSeparatorTableCell.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/net/nikr/eve/jeveasset/gui/tabs/stockpile/StockpileSeparatorTableCell.java b/src/main/java/net/nikr/eve/jeveasset/gui/tabs/stockpile/StockpileSeparatorTableCell.java index f855de6eb..160823bbc 100644 --- a/src/main/java/net/nikr/eve/jeveasset/gui/tabs/stockpile/StockpileSeparatorTableCell.java +++ b/src/main/java/net/nikr/eve/jeveasset/gui/tabs/stockpile/StockpileSeparatorTableCell.java @@ -494,6 +494,16 @@ protected JViewport getParentViewport() { } } + @Override + protected void expandSeparator(final boolean expand) { + super.expandSeparator(expand); + StockpileItem currentItem = (StockpileItem) currentSeparator.first(); + if (currentItem == null) { // handle 'late' rendering calls after this separator is invalid + return; + } + Settings.get().getStockpileGroupSettings().setStockpileExpanded(currentItem.getStockpile(), expand); + } + private class ListenerClass implements HierarchyListener, AdjustmentListener, ActionListener, CellEditorListener, KeyListener { private boolean update = true;