library root is set if file is saved and there is no root yet.

This commit is contained in:
hneemann 2017-04-01 16:00:49 +02:00
parent 7c9d656c91
commit bfc094dc27

View File

@ -959,7 +959,11 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
circuitComponent.getCircuit().save(filename);
stoppedState.enter();
setFilename(filename, toPrefs);
library.invalidateElement(filename);
if (library.getRootFilePath() == null)
library.setRootFilePath(filename.getParentFile());
} catch (IOException e) {
new ErrorMessage(Lang.get("msg_errorWritingFile")).addCause(e).show();
}