Skip to content

Commit

Permalink
Bug Fix: Stockpiles collapsing after adding item (Issue #497)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenGnu committed Oct 29, 2024
1 parent 1517720 commit 70be591
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70be591

Please sign in to comment.