diff --git a/main/src/controller/MainController.java b/main/src/controller/MainController.java index 14669e6c5b9ef5cbdfbce5168dcb58841390eded..e7d6b67e50c054703096f0a6b8bc46f2c83d3d3c 100644 --- a/main/src/controller/MainController.java +++ b/main/src/controller/MainController.java @@ -607,6 +607,10 @@ public class MainController { if(icons.get(file1)!= null){ backStack.push(new FrontAndBack(file1,2)); openOperations.openFolder(fileExplorer,currentFile,icons); + recentNode = treeMap.get(currentFile); + recentNode.setExpanded(false); + String pathName = getAbsPath(currentFile.getParent()); + pathText.setText(pathName); } } if(frontAndBack.getDirection() == 2){ @@ -614,7 +618,11 @@ public class MainController { if(icons.get(file1) != null){ currentFile = file1.getParent(); backStack.push(new FrontAndBack(file1,1)); - openOperations.openFolder(fileExplorer,currentFile,icons); + openOperations.openFolder(fileExplorer,currentFile,icons); recentNode = treeMap.get(currentFile); + recentNode.setExpanded(false); + String pathName = getAbsPath(currentFile.getParent()); + pathText.setText(pathName); + } } } @@ -629,6 +637,10 @@ public class MainController { frontStack.clear(); currentFile = rootFile; openOperations.openFolder(fileExplorer,currentFile,icons); + recentNode = treeMap.get(currentFile); + recentNode.setExpanded(false); + String pathName = getAbsPath(currentFile.getParent()); + pathText.setText(pathName); } } @@ -643,6 +655,10 @@ public class MainController { if(icons.get(file1)!= null){ frontStack.push(new FrontAndBack(file1,2)); openOperations.openFolder(fileExplorer,currentFile,icons); + recentNode = treeMap.get(currentFile); + recentNode.setExpanded(false); + String pathName = getAbsPath(currentFile.getParent()); + pathText.setText(pathName); } } if(frontAndBack.getDirection() == 2) { @@ -651,6 +667,10 @@ public class MainController { currentFile = file1.getParent(); frontStack.push(new FrontAndBack(file1,1)); openOperations.openFolder(fileExplorer,currentFile,icons); + recentNode = treeMap.get(currentFile); + recentNode.setExpanded(false); + String pathName = getAbsPath(currentFile.getParent()); + pathText.setText(pathName); } } }