Skip to content

Commit 83ede8f

Browse files
matthijskooijmancmaglie
authored andcommitted
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.
1 parent f47ec35 commit 83ede8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/processing/app/Preferences.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public void actionPerformed(ActionEvent e) {
492492
final JLabel clickable = label;
493493
label.addMouseListener(new MouseAdapter() {
494494
public void mousePressed(MouseEvent e) {
495-
Base.openFolder(Base.getSettingsFolder());
495+
Base.openFolder(preferencesFile.getParentFile());
496496
}
497497

498498
public void mouseEntered(MouseEvent e) {

0 commit comments

Comments
 (0)