Merge pull request #395 from teyrana/alpha7

Alpha7 - Aggregate further bugfixes - #330, #378
This commit is contained in:
Wes Cravens 2018-03-27 15:24:34 -05:00 committed by GitHub
commit 79eaebe06e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 13 deletions

View File

@ -33,6 +33,7 @@ import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.Markers;
import net.sf.openrocket.rocketcomponent.BodyComponent;
import net.sf.openrocket.rocketcomponent.BodyTube;
import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
import net.sf.openrocket.rocketcomponent.EllipticalFinSet;
import net.sf.openrocket.rocketcomponent.FinSet;
import net.sf.openrocket.rocketcomponent.FreeformFinSet;
@ -400,18 +401,22 @@ public class ScaleDialog extends JDialog {
panel.add(scaleMassValues, "span, wrap para*3");
// Buttons
// Scale / Accept Buttons
JButton scale = new JButton(trans.get("button.scale"));
scale.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
doScale();
ScaleDialog.this.document.getRocket().fireComponentChangeEvent( ComponentChangeEvent.AEROMASS_CHANGE);
ScaleDialog.this.setVisible(false);
}
});
panel.add(scale, "span, split, right, gap para");
// Cancel Button
JButton cancel = new JButton(trans.get("button.cancel"));
cancel.addActionListener(new ActionListener() {
@Override

View File

@ -106,7 +106,7 @@ public class ComponentPresetChooserDialog extends JDialog {
sub.add(filterLabel, "gapright para");
filterText = new JTextField();
sub.add(filterText, "growx");
sub.add(filterText, "width 50:320, growx");
filterText.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) {
@ -174,7 +174,7 @@ public class ComponentPresetChooserDialog extends JDialog {
private JPanel getFilterCheckboxes() {
SymmetricComponent sc;
JPanel panel = new JPanel(new MigLayout("fill, ins 0"));
JPanel panel = new JPanel(new MigLayout("ins 0"));
/*
* Add show all compatible check box.

View File

@ -50,11 +50,14 @@ public class ExampleDesignFile implements Comparable<ExampleDesignFile> {
logger.debug("Cannot find jar file, trying to load from directory");
designs = getDirFileNames();
}
if (designs == null || designs.length == 0) {
return null;
if (designs == null ){
return new ExampleDesignFile[0];
}
if( 0 < designs.length ) {
Arrays.sort(designs);
}
Arrays.sort(designs);
return designs;
}

View File

@ -120,10 +120,7 @@ public class IntegrationTest {
checkUndoState(null, null);
InnerTube mmt = (InnerTube)config.getRocket().getChild(0).getChild(1).getChild(2);
System.err.println(String.format("IntegrationTest::testSimpleRocket(...)...."));
System.err.println(String.format(" Config: %s", config.toDebug() ));
System.err.println(String.format(" motor config: %s", mmt.getMotorConfig( config.getId() ).toDescription() ));
// Compute cg+cp + altitude
// double cgx, double mass, double cpx, double cna)
checkCgCp(0.248, 0.0645, 0.320, 12.0);