Fix up failures from the previous merges.

This commit is contained in:
kruland2607 2012-10-23 21:56:35 -05:00
parent 4466bc3f8a
commit 04ee758e6a
3 changed files with 4 additions and 24 deletions

View File

@ -759,7 +759,7 @@ RocketCompCfg.lbl.Commentsonthe = Comments on the
RocketCompCfg.lbl.Figurestyle = Figure style:
RocketCompCfg.lbl.Componentcolor = Component color:
RocketCompCfg.lbl.Choosecolor = Choose color
RocketCompCfg.checkbox.Usedefaultcolor = Use default
RocketCompCfg.checkbox.Usedefaultcolor = Use default color
RocketCompCfg.lbl.Complinestyle = Component line style:
RocketCompCfg.but.Saveasdefstyle = Save as default style
RocketCompCfg.lbl.Diameter = Diameter:

View File

@ -61,6 +61,9 @@ public class OpenRocketDocument implements ComponentChangeListener {
private final ArrayList<Simulation> simulations = new ArrayList<Simulation>();
private ArrayList<CustomExpression> customExpressions = new ArrayList<CustomExpression>();
private DecalRegistry decalRegistry = new DecalRegistry();
/*
* The undo/redo variables and mechanism are documented in doc/undo-redo-flow.*
*/
@ -85,7 +88,6 @@ public class OpenRocketDocument implements ComponentChangeListener {
private String nextDescription = null;
private String storedDescription = null;
private DecalRegistry decalRegistry = new DecalRegistry();
private ArrayList<UndoRedoListener> undoRedoListeners = new ArrayList<UndoRedoListener>(2);

View File

@ -1,22 +0,0 @@
@@ -1087,11 +1086,20 @@
}
}
+ if ( filename == null ) {
+ filename = "";
+ }
+
+ // Remove path from filename
+ if (filename.lastIndexOf('/') >= 0) {
+ filename = filename.substring(filename.lastIndexOf('/') + 1);
+ }
+
// Open the file
log.info("Opening file from url=" + url + " filename=" + filename);
try {
InputStream is = url.openStream();
- if (open(is, url, parent)) {
+ if (open(is, filename, url, parent)) {
// Close previous window if replacing
if (parent.replaceable && parent.document.isSaved()) {
parent.closeAction();