Better selection approach. Searched by keywordslist name

This commit is contained in:
sidheshenator 2015-02-20 10:39:13 -05:00
parent 6ebfc4b2b1
commit 2d51be677f

View File

@ -197,15 +197,12 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
if (shouldAdd) {
writer.addList(listName, new ArrayList<Keyword>());
}
tableModel.resync();
for (int i = 0; i < listsTable.getRowCount(); i++) {
if (listsTable.getValueAt(i, 0).equals(listName)) {
listsTable.getSelectionModel().addSelectionInterval(i, i);
}
}
tableModel.resync();
int keywordListPosition = listsTable.getRowCount() - 1;
listsTable.setRowSelectionInterval(keywordListPosition, keywordListPosition);
}//GEN-LAST:event_newListButtonActionPerformed
private void importButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importButtonActionPerformed