Clean up on aisle 5

This commit is contained in:
SiboVG 2022-05-30 15:05:06 +02:00
parent f762dc11aa
commit 5d80a3a167

View File

@ -464,11 +464,12 @@ public class SimulationPanel extends JPanel {
simulationTable.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
int selectedRow = simulationTable.getSelectedRow();
if (selectedRow < 0) {
return;
}
if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
int selectedRow = simulationTable.getSelectedRow();
if (selectedRow < 0) {
return;
}
int selected = simulationTable.convertRowIndexToModel(selectedRow);
int column = simulationTable.columnAtPoint(e.getPoint());
@ -481,11 +482,7 @@ public class SimulationPanel extends JPanel {
openDialog(document.getSimulations().get(selected));
}
} else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1){
int selectedRow = simulationTable.getSelectedRow();
if (selectedRow < 0) {
return;
}
} else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1) {
doPopup(e);
}
}