DBE-3186 delete row scrolls grid view to very last column

This commit is contained in:
dmitriy.tseyler
2016-09-29 18:44:41 +03:00
parent f6ecfaac2f
commit 3651f79b40
@@ -304,9 +304,9 @@ public class JBAutoscroller implements ActionListener {
int row = getLeadSelectionIndexIfSelectionIsNotEmpty(getRowSelectionModel());
int col = getLeadSelectionIndexIfSelectionIsNotEmpty(getColumnSelectionModel());
if (row >= 0 && row < myTable.getRowCount() || col >= 0 && col < myTable.getColumnCount()) {
myTable.scrollRectToVisible(myTable.getCellRect(row, col, false));
}
boolean validRow = (row >= 0 || myTable.getRowCount() == 0) && row < myTable.getRowCount();
boolean validCol = (col >= 0 || myTable.getColumnCount() == 0) && col < myTable.getColumnCount();
if (validRow && validCol) myTable.scrollRectToVisible(myTable.getCellRect(row, col, false));
}
private boolean locked() {