Skip to content

Commit

Permalink
fixed filetable rendering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
trol73 committed Dec 25, 2016
1 parent 1b78f62 commit 956a767
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public class CompactFileTableModel extends BaseFileTableModel {

final int columns;

protected int visibleRows;
private int visibleRows;

// private int rowCount;

private int offset;

/** Cell values cache */
protected String cellValuesCache[];
private String cellValuesCache[];

public CompactFileTableModel(int columns, int visibleRows) {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public synchronized int getRowCount() {

@Override
public synchronized Object getValueAt(int rowIndex, int columnIndex) {
if (cellValuesCache.length <= columnIndex) {
if (rowIndex >= cellValuesCache.length || columnIndex >= cellValuesCache[rowIndex].length) {
return null;
}
// Need to check that row index is not larger than actual number of rows
Expand Down Expand Up @@ -199,7 +199,6 @@ public synchronized Object getValueAt(int rowIndex, int columnIndex) {
result = fillOneCellCache(index, parent != null ? fileIndex + 1 : fileIndex)[columnIndex];
}
// TODO preload icons for all visible files

return result;
}

Expand Down

0 comments on commit 956a767

Please sign in to comment.