Allow for discontinuous row selection

No idea why this was once implemented
This commit is contained in:
SiboVG 2023-07-26 12:13:49 +02:00
parent bb97ce6987
commit e3a9786551
2 changed files with 4 additions and 2 deletions

View File

@ -617,6 +617,7 @@ simpanel.ttip.notSimulated = <i>Not simulated yet</i><br>Click <i><b>Run simulat
simpanel.ttip.noData = No simulation data available.
simpanel.ttip.noWarnings = <font color=\"gray\">No warnings.</font>
simpanel.ttip.warnings = <font color=\"red\">Warnings:</font>
simpanel.msg.invalidCopySelection = Invalid copy selection
! SimulationRunDialog
SimuRunDlg.title.RunSim = Running simulations\u2026

View File

@ -489,8 +489,9 @@ public class SimulationPanel extends JPanel {
int numRows = simulationTable.getSelectedRowCount();
int[] rowsSelected = simulationTable.getSelectedRows();
if (numRows != (rowsSelected[rowsSelected.length-1] - rowsSelected[0] + 1) || numRows != rowsSelected.length) {
JOptionPane.showMessageDialog(null, "Invalid Copy Selection", "Invalid Copy Selection", JOptionPane.ERROR_MESSAGE);
if (numRows != rowsSelected.length) {
JOptionPane.showMessageDialog(this, trans.get("simpanel.msg.invalidCopySelection"),
trans.get("simpanel.msg.invalidCopySelection"), JOptionPane.ERROR_MESSAGE);
return;
}