git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@739
180e2498-e6e9-4542-8430-
84ac67f01cd8
@Override
public void actionPerformed(ActionEvent e){
Window parent = SwingUtilities.getWindowAncestor(CustomExpressionPanel.this);
@Override
public void actionPerformed(ActionEvent e){
Window parent = SwingUtilities.getWindowAncestor(CustomExpressionPanel.this);
- expression.editExpression(parent);
+ new ExpressionBuilderDialog(parent, expression.getSimulation(), expression).setVisible(true);
updateExpressions();
}
});
updateExpressions();
}
});
package net.sf.openrocket.simulation;
package net.sf.openrocket.simulation;
import java.util.SortedMap;
import java.util.TreeMap;
import net.sf.openrocket.document.Simulation;
import java.util.SortedMap;
import java.util.TreeMap;
import net.sf.openrocket.document.Simulation;
-import net.sf.openrocket.gui.customexpression.ExpressionBuilderDialog;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.FixedUnitGroup;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.FixedUnitGroup;
- /*
- * Opens an ExpressionBuilderDialog for this expression
- */
- public void editExpression(Window parent){
- log.debug("Opening window to edit an existing custom expression");
- new ExpressionBuilderDialog(parent, sim, this).setVisible(true);
- }
-
/*
* Use this to update the simulation this is associated with
*/
/*
* Use this to update the simulation this is associated with
*/
CustomExpression.sim = sim;
}
CustomExpression.sim = sim;
}
+ public Simulation getSimulation() {
+ return CustomExpression.sim;
+ }
+
/*
* Returns the flight data branch 0 for this simulation, or an empty branch
* if no simulated data exists
/*
* Returns the flight data branch 0 for this simulation, or an empty branch
* if no simulated data exists