Don't use selected row, but target row for selection

This commit is contained in:
SiboVG 2023-09-17 18:43:37 +02:00
parent 9ac7f9bb99
commit 7305670fb0

View File

@ -77,11 +77,10 @@ public class ComponentPresetTable extends JTable {
if (columnIndex != 0) {
return;
}
int selectedRow = ComponentPresetTable.this.getSelectedRow();
ComponentPreset preset = ComponentPresetTable.this.presets.get(rowIndex);
Application.getComponentPresetDao().setFavorite(preset, presetType, (Boolean) aValue);
ComponentPresetTable.this.updateFavorites();
ComponentPresetTable.this.setRowSelectionInterval(selectedRow, selectedRow);
ComponentPresetTable.this.setRowSelectionInterval(rowIndex, rowIndex);
}
@Override