Skip to content

Commit a62477f

Browse files
committed
Filter is working now
1 parent ee133fe commit a62477f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/src/processing/app/contrib/ContributionListPanel.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,17 +385,18 @@ void updatePanelOrdering(Set<Contribution> contributionsSet) {
385385
c.anchor = GridBagConstraints.NORTH;
386386
add(status, c);*/
387387
// System.out.println(dtm.getDataVector());
388-
int row = table.getSelectedRow();
389388
dtm.getDataVector().removeAllElements();
390389
dtm.fireTableDataChanged();
390+
int rowCount = 0;
391391
for (Contribution entry : contributionsSet) {
392392
((MyTableModel) table.getModel()).addRow(new Object[] {
393393
entry, entry, entry });
394+
if (selectedPanel != null && entry.getName()
395+
.equals(selectedPanel.getContrib().getName())) {
396+
table.setRowSelectionInterval(rowCount, rowCount);
397+
}
398+
rowCount++;
394399
}
395-
if (row >= 0) {
396-
table.setRowSelectionInterval(row, row);
397-
}
398-
399400
}
400401

401402

0 commit comments

Comments
 (0)