From eaed44864c9bcf1dbfbe670e161ddbfdba4b4cfb Mon Sep 17 00:00:00 2001 From: Daniel Neel Date: Sat, 25 May 2013 01:30:57 -0300 Subject: [PATCH 1/3] Added a README to the repo. --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..56b4d0de7 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Source code for the U of L USLI team's version of OpenRocket, used for flight simulation. From cd255e1828ad6e7680e7a3bafb1a21b319b73d31 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 8 Jun 2013 12:34:47 -0400 Subject: [PATCH 2/3] Added a dialog box that displays when no simulations are selected. --- .../sf/openrocket/gui/main/SimulationPanel.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/src/net/sf/openrocket/gui/main/SimulationPanel.java b/core/src/net/sf/openrocket/gui/main/SimulationPanel.java index 37df70c91..9b34c547b 100644 --- a/core/src/net/sf/openrocket/gui/main/SimulationPanel.java +++ b/core/src/net/sf/openrocket/gui/main/SimulationPanel.java @@ -23,9 +23,6 @@ import javax.swing.ListSelectionModel; import javax.swing.SwingUtilities; import javax.swing.table.DefaultTableCellRenderer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import net.miginfocom.swing.MigLayout; import net.sf.openrocket.aerodynamics.Warning; import net.sf.openrocket.aerodynamics.WarningSet; @@ -48,6 +45,9 @@ import net.sf.openrocket.startup.Application; import net.sf.openrocket.startup.Preferences; import net.sf.openrocket.unit.UnitGroup; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class SimulationPanel extends JPanel { private static final Logger log = LoggerFactory.getLogger(SimulationPanel.class); private static final Translator trans = Application.getTranslator(); @@ -130,9 +130,11 @@ public class SimulationPanel extends JPanel { @Override public void actionPerformed(ActionEvent e) { int[] selection = simulationTable.getSelectedRows(); - if (selection.length == 0) - return; // TODO: LOW: "None selected" dialog - + if (selection.length == 0) { + JOptionPane.showMessageDialog(simulationTable, "No simulations selected."); + return; + } + Simulation[] sims = new Simulation[selection.length]; for (int i = 0; i < selection.length; i++) { selection[i] = simulationTable.convertRowIndexToModel(selection[i]); @@ -512,7 +514,6 @@ public class SimulationPanel extends JPanel { } - public ListSelectionModel getSimulationListSelectionModel() { return simulationTable.getSelectionModel(); } From 6299898da7eafe55e3ba9bedc801861442796639 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 8 Jun 2013 12:42:06 -0400 Subject: [PATCH 3/3] Reverted a commit that is specific to my project. --- README.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 56b4d0de7..000000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -Source code for the U of L USLI team's version of OpenRocket, used for flight simulation.