mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix TableUtil#scrollSelectionToVisible not scrolling outside of visible area
This commit is contained in:
@@ -67,7 +67,7 @@ public class TableUtil {
|
||||
Rectangle maxCellRect = table.getCellRect(maxSelectionIndex, maxColumnSelectionIndex, false);
|
||||
Point selectPoint = minCellRect.getLocation();
|
||||
int allHeight = maxCellRect.y + maxCellRect.height - minCellRect.y;
|
||||
allHeight = Math.min(allHeight, table.getVisibleRect().height);
|
||||
allHeight = Math.min(allHeight, table.getHeight());
|
||||
table.scrollRectToVisible(new Rectangle(selectPoint, new Dimension(minCellRect.width / 2,allHeight)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user