[#1681] Fix sim table spotlight when no simulations

This commit is contained in:
SiboVG 2022-09-20 10:25:58 +02:00
parent ac03049277
commit baa841818c

View File

@ -1006,7 +1006,7 @@ public class SimulationPanel extends JPanel {
*/ */
public void takeTheSpotlight() { public void takeTheSpotlight() {
simulationTable.requestFocusInWindow(); simulationTable.requestFocusInWindow();
if (simulationTable.getSelectedRows().length > 0) { if (simulationTable.getRowCount() == 0 || simulationTable.getSelectedRows().length > 0) {
return; return;
} }
if (previousSelection == null || previousSelection.length == 0) { if (previousSelection == null || previousSelection.length == 0) {