From 83ede8fdb44fd9997cbfe2944671afff9c071bde Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 10 Apr 2014 12:34:52 +0200 Subject: [PATCH] Fix preference directory opening in the GUI with --preferences-file In the preferences dialog, the name of the preferences file is shown for advanced editing. If the filename is clicked, the folder containing the file is opened. However, this always used Base.getSettingsFolder, which is the folder where the settings file _normally_ resides. But when the --preferences-file option is used, the actual preferences file might be somewhere else. This commit makes sure to always open up the parent directory of the actual preferences file in use, instead of always the default one. --- app/src/processing/app/Preferences.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index 3e0d564eb..dc2b04b99 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -492,7 +492,7 @@ public class Preferences { final JLabel clickable = label; label.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { - Base.openFolder(Base.getSettingsFolder()); + Base.openFolder(preferencesFile.getParentFile()); } public void mouseEntered(MouseEvent e) {