Don't use selected row, but target row for selection
This commit is contained in:
parent
9ac7f9bb99
commit
7305670fb0
@ -74,14 +74,13 @@ public class ComponentPresetTable extends JTable {
|
|||||||
@Override
|
@Override
|
||||||
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||||
// Only support favorite
|
// Only support favorite
|
||||||
if ( columnIndex != 0 ) {
|
if (columnIndex != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int selectedRow = ComponentPresetTable.this.getSelectedRow();
|
|
||||||
ComponentPreset preset = ComponentPresetTable.this.presets.get(rowIndex);
|
ComponentPreset preset = ComponentPresetTable.this.presets.get(rowIndex);
|
||||||
Application.getComponentPresetDao().setFavorite(preset, presetType, (Boolean) aValue);
|
Application.getComponentPresetDao().setFavorite(preset, presetType, (Boolean) aValue);
|
||||||
ComponentPresetTable.this.updateFavorites();
|
ComponentPresetTable.this.updateFavorites();
|
||||||
ComponentPresetTable.this.setRowSelectionInterval(selectedRow, selectedRow);
|
ComponentPresetTable.this.setRowSelectionInterval(rowIndex, rowIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user