Use proper view index in table selection

This commit is contained in:
SiboVG 2023-10-23 20:00:23 +02:00
parent 3e33c8fceb
commit c5e8bbbe9c

View File

@ -86,7 +86,10 @@ public class ComponentPresetTable extends JTable {
ComponentPreset preset = ComponentPresetTable.this.presets.get(rowIndex);
Application.getComponentPresetDao().setFavorite(preset, presetType, (Boolean) aValue);
ComponentPresetTable.this.updateFavorites();
ComponentPresetTable.this.setRowSelectionInterval(rowIndex, rowIndex);
int viewIndex = ComponentPresetTable.this.convertRowIndexToView(rowIndex);
if (viewIndex != -1) {
ComponentPresetTable.this.setRowSelectionInterval(viewIndex, viewIndex);
}
}
@Override