git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@167
180e2498-e6e9-4542-8430-
84ac67f01cd8
private static final ArrayList<BasicFrame> frames = new ArrayList<BasicFrame>();
private static final ArrayList<BasicFrame> frames = new ArrayList<BasicFrame>();
/**
* Whether "New" and "Open" should replace this frame.
* Should be set to false on the first rocket modification.
/**
* Whether "New" and "Open" should replace this frame.
* Should be set to false on the first rocket modification.
// Close previous window if replacing
if (replaceable && document.isSaved()) {
// Close previous window if replacing
if (replaceable && document.isSaved()) {
+ // We are replacing the frame, make new window have current location
+ BasicFrame newFrame = frames.get(frames.size() - 1);
+ newFrame.setLocation(this.getLocation());
+
log.info("Closing window because it is replaceable");
closeAction();
replaceable = false;
log.info("Closing window because it is replaceable");
closeAction();
replaceable = false;
doc.setFile(file);
doc.setSaved(true);
doc.setFile(file);
doc.setSaved(true);
// Open the frame
log.debug("Opening new frame with the document");
BasicFrame frame = new BasicFrame(doc);
// Open the frame
log.debug("Opening new frame with the document");
BasicFrame frame = new BasicFrame(doc);