Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 92d1c8e

Browse filesBrowse files
committed
Merge pull request #100 from sgk/sortPrefs
Sort keys in the preferences.txt.
2 parents ce1ccb4 + 1750ff0 commit 92d1c8e
Copy full SHA for 92d1c8e

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

‎app/src/processing/app/Preferences.java

Copy file name to clipboardExpand all lines: app/src/processing/app/Preferences.java
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,10 @@ static protected void save() {
734734
// Fix for 0163 to properly use Unicode when writing preferences.txt
735735
PrintWriter writer = PApplet.createWriter(preferencesFile);
736736

737-
Enumeration e = table.keys(); //properties.propertyNames();
738-
while (e.hasMoreElements()) {
739-
String key = (String) e.nextElement();
737+
String[] keys = (String[])table.keySet().toArray(new String[0]);
738+
Arrays.sort(keys);
739+
for (String key: keys)
740740
writer.println(key + "=" + ((String) table.get(key)));
741-
}
742741

743742
writer.flush();
744743
writer.close();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.