Fix sim table focus after actions
This commit is contained in:
parent
dc06792ea3
commit
485f1ad010
@ -513,6 +513,7 @@ public class SimulationPanel extends JPanel {
|
|||||||
break;
|
break;
|
||||||
simulationTable.addRowSelectionInterval(row, row);
|
simulationTable.addRowSelectionInterval(row, row);
|
||||||
}
|
}
|
||||||
|
takeTheSpotlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
private abstract static class SimulationAction extends AbstractAction {
|
private abstract static class SimulationAction extends AbstractAction {
|
||||||
@ -997,7 +998,7 @@ public class SimulationPanel extends JPanel {
|
|||||||
*/
|
*/
|
||||||
public void takeTheSpotlight() {
|
public void takeTheSpotlight() {
|
||||||
simulationTable.requestFocusInWindow();
|
simulationTable.requestFocusInWindow();
|
||||||
if (simulationTable.getRowCount() > 0) {
|
if (simulationTable.getSelectedRowCount() == 0 && simulationTable.getRowCount() > 0) {
|
||||||
simulationTable.setRowSelectionInterval(0, 0);
|
simulationTable.setRowSelectionInterval(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user