Skip to content

Commit

Permalink
Bug Fix: Ensure stockpile cell is visible after being expanded
Browse files Browse the repository at this point in the history
Merge main
  • Loading branch information
GoldenGnu committed Sep 22, 2024
2 parents 4e7c77b + f306d4b commit 267f0ab
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ private void scrollToRow(final int row) {

// Scroll the area into view
viewport.scrollRectToVisible(rect);

//Ensure stockpile cell is visible
rect = jTable.getCellRect(currentRow, 0, true);
pt = viewport.getViewPosition();
rect.setLocation(rect.x - pt.x, rect.y - pt.y);
viewport.scrollRectToVisible(rect);
}

public class JSeparatorPanel extends JPanel {
Expand Down

0 comments on commit 267f0ab

Please sign in to comment.