if no source line is available, show row index instead

This commit is contained in:
hneemann 2019-02-18 10:47:16 +01:00
parent 05578f9481
commit b820fcfdfa

View File

@ -67,9 +67,13 @@ public class ValueTableModel implements TableModel, Observer {
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
if (columnIndex == 0)
return values.getSourceLine(rowIndex);
else
if (columnIndex == 0) {
final int row = values.getSourceLine(rowIndex);
if (row < 0)
return rowIndex;
else
return row;
} else
return values.getTableValue(rowIndex, columnIndex - 1);
}