Merge pull request #1855 from SiboVG/issue-1813
[#1813] Update previous selection on sim addition/deletion
This commit is contained in:
commit
eb8d7615ab
@ -275,6 +275,7 @@ public class SimulationPanel extends JPanel {
|
||||
simulationTableModel.fireTableDataChanged();
|
||||
simulationTable.clearSelection();
|
||||
simulationTable.addRowSelectionInterval(n, n);
|
||||
updatePreviousSelection();
|
||||
|
||||
openDialog(false, sim);
|
||||
}
|
||||
@ -347,6 +348,7 @@ public class SimulationPanel extends JPanel {
|
||||
document.removeSimulation(selection[i]);
|
||||
}
|
||||
simulationTableModel.fireTableDataChanged();
|
||||
updatePreviousSelection();
|
||||
takeTheSpotlight();
|
||||
}
|
||||
|
||||
@ -1007,6 +1009,9 @@ public class SimulationPanel extends JPanel {
|
||||
} else {
|
||||
simulationTable.clearSelection();
|
||||
for (int row : previousSelection) {
|
||||
if (row < 0 || row >= simulationTable.getRowCount()) {
|
||||
continue;
|
||||
}
|
||||
simulationTable.addRowSelectionInterval(row, row);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user