FileBrowser: go to previous in history did not work 17/11417/2
Calixte DENIZET [Sat, 27 Apr 2013 17:34:25 +0000 (19:34 +0200)]
Change-Id: Ide47f9f0dec339dcf6edda344f85e4119aaadcb2

scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileBrowserHistory.java

index 8d0f97a..d001eb2 100644 (file)
@@ -63,7 +63,7 @@ public class ScilabFileBrowserHistory {
         previous.setIcon(PREVIOUSICON);
 
         final SwingScilabPushButton swingPrevious = (SwingScilabPushButton) previous.getAsSimplePushButton();
-       swingPrevious.setToolTipText(UiDataMessages.PREVIOUSDIR);
+        swingPrevious.setToolTipText(UiDataMessages.PREVIOUSDIR);
         swingPrevious.addMouseListener(new MouseAdapter() {
             @Override
             public void mousePressed(MouseEvent e) {
@@ -94,6 +94,7 @@ public class ScilabFileBrowserHistory {
                     showPopup(true);
                 } else if (SwingUtilities.isLeftMouseButton(e) && !popup.isVisible() && previous.isEnabled()) {
                     ScilabFileBrowserHistory.this.stt.setBaseDir(history.get(position - 1), false);
+                    chDir(history.get(position - 1));
                     setPositionInHistory(position - 1);
                 }
             }
@@ -103,7 +104,7 @@ public class ScilabFileBrowserHistory {
         next.setIcon(NEXTICON);
 
         final SwingScilabPushButton swingNext = (SwingScilabPushButton) next.getAsSimplePushButton();
-       swingNext.setToolTipText(UiDataMessages.NEXTDIR);
+        swingNext.setToolTipText(UiDataMessages.NEXTDIR);
         swingNext.addMouseListener(new MouseAdapter() {
             @Override
             public void mousePressed(MouseEvent e) {