Remove dependency on awt.Window from CustomExpression since this makes the android app very upset.
This commit is contained in:
parent
16eed9a30b
commit
50f3fc39a6
@ -137,7 +137,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e){
|
public void actionPerformed(ActionEvent e){
|
||||||
Window parent = SwingUtilities.getWindowAncestor(CustomExpressionPanel.this);
|
Window parent = SwingUtilities.getWindowAncestor(CustomExpressionPanel.this);
|
||||||
expression.editExpression(parent);
|
new ExpressionBuilderDialog(parent, expression.getSimulation(), expression).setVisible(true);
|
||||||
updateExpressions();
|
updateExpressions();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
package net.sf.openrocket.simulation;
|
package net.sf.openrocket.simulation;
|
||||||
|
|
||||||
import java.awt.Window;
|
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import net.sf.openrocket.document.Simulation;
|
import net.sf.openrocket.document.Simulation;
|
||||||
import net.sf.openrocket.gui.customexpression.ExpressionBuilderDialog;
|
|
||||||
import net.sf.openrocket.logging.LogHelper;
|
import net.sf.openrocket.logging.LogHelper;
|
||||||
import net.sf.openrocket.startup.Application;
|
import net.sf.openrocket.startup.Application;
|
||||||
import net.sf.openrocket.unit.FixedUnitGroup;
|
import net.sf.openrocket.unit.FixedUnitGroup;
|
||||||
@ -76,14 +74,6 @@ public class CustomExpression implements Cloneable{
|
|||||||
setSimulation(sim);
|
setSimulation(sim);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* 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
|
||||||
*/
|
*/
|
||||||
@ -91,6 +81,10 @@ public class CustomExpression implements Cloneable{
|
|||||||
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
|
* Returns the flight data branch 0 for this simulation, or an empty branch
|
||||||
* if no simulated data exists
|
* if no simulated data exists
|
||||||
|
Loading…
x
Reference in New Issue
Block a user