mirror of
https://github.com/processing/processing4.git
synced 2026-02-10 00:59:40 +01:00
properly storing window settings
This commit is contained in:
@@ -477,6 +477,8 @@ public class PdeEditor extends JFrame
|
||||
* Called when the application is quitting.
|
||||
*/
|
||||
public void storePreferences() {
|
||||
System.out.println("storing preferences");
|
||||
|
||||
// window location information
|
||||
Rectangle bounds = getBounds();
|
||||
PdePreferences.setInteger("last.window.x", bounds.x);
|
||||
@@ -484,6 +486,10 @@ public class PdeEditor extends JFrame
|
||||
PdePreferences.setInteger("last.window.width", bounds.width);
|
||||
PdePreferences.setInteger("last.window.height", bounds.height);
|
||||
|
||||
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
PdePreferences.setInteger("last.screen.width", screen.width);
|
||||
PdePreferences.setInteger("last.screen.height", screen.height);
|
||||
|
||||
// last sketch that was in use
|
||||
PdePreferences.set("last.sketch.name", sketchName);
|
||||
PdePreferences.set("last.sketch.path", sketchDir.getAbsolutePath());
|
||||
|
||||
Reference in New Issue
Block a user