Skip to content

Commit 42d1857

Browse files
author
SeTSeR
committed
Saving latest opened directory
1 parent 119c3ef commit 42d1857

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/com/temporaryteam/noticeditor/view/NoticeController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void writeNode(NoticeCategory node, String name) throws IOException {
121121
public void rebuild(String str) {
122122
ArrayList<NoticeCategory> list = new ArrayList<NoticeCategory>();
123123
list.add(new NoticeCategory("Default notice", str));
124-
currentNotice = new NoticeCategory("Default notice", list);
124+
currentNotice = new NoticeCategory("Default branch", list);
125125
noticeTree.setRoot(createNode(currentNotice));
126126
}
127127

@@ -205,6 +205,7 @@ else if((source.equals(openItem))||(source.equals(saveAsItem))) {
205205
try {
206206
File selected = null;
207207
if(source.equals(openItem)) {
208+
if(openedFile!=null) chooser.setInitialDirectory(new File(openedFile.getParent()));
208209
selected = chooser.showOpenDialog(main.getPrimaryStage());
209210
}
210211
else if(source.equals(saveAsItem)) {

0 commit comments

Comments
 (0)