Skip to content

IDE 1.8.8 does not remember last sketch nor window size. #8337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vimes666 opened this issue Dec 28, 2018 · 10 comments
Closed

IDE 1.8.8 does not remember last sketch nor window size. #8337

vimes666 opened this issue Dec 28, 2018 · 10 comments
Labels

Comments

@vimes666
Copy link

I installed IDE 1.8.8 in linux mint (mate versions 18.1 and 19.1) to find that the IDE does not remember the last edited sketch when starting up.
Also it starts with a small window size no matter what the scaling settings are.
On my other pc's I am still using 1.8.5 and they are working ok.
So I did some digging and found out that version 1.8.7 is still working fine here.
I also found that the issue remembering the last sketch is most likely caused by a reset to zero
of the last.sketch.count (in preferences.txt) at some point by the program.
I have no idea as to what could be causing the window sizing issue though.

@feikname
Copy link
Contributor

Are any other settings, e.g. trying to change the font, saved just fine? If not, it might be an issue with your filesystem permissions.

@vimes666
Copy link
Author

vimes666 commented Dec 28, 2018

As far as I have checked all changes to the preferences are neatly kept in preferences.txt, except for last.sketch.count. Even the path to the correct last sketch is kept in the preferences, but IDE keeps resetting the last.sketch.count back to zero so it displays the empty sketch skelleton.

@vimes666
Copy link
Author

update--
I just fixed the windows sizing issue by changing the values of editor.window.height.default and editor.window.width.default in prefences.txt by hand. This setting now persists after a restart, however IDE will not remember any window resizing. I can live with that.

@vimes666
Copy link
Author

update--
The last sketch path is not saved in the preferences, I was confused with recent.sketches.

@vimes666
Copy link
Author

I think I have found the culprit. In this change e1a5be7#diff-b6fda0bf6be0a53c0741a9b02ac16f37
the quit routine is tidied up. However it also deletes the call to storeScreenDimensions() and storeSketches().
Can somebody have a look at this?

@mitag
Copy link

mitag commented Dec 31, 2018

I made the same experiences with the IDE 1.8.8 under Windows 10. The last sketch, window position and size are no longer saved. Since I have a copy of the IDE 1.8.7 on my local server, I installed the older version again and everything is fine again.

@facchinm
Copy link
Member

facchinm commented Jan 2, 2019

Hi @vimes666 ,
thanks for reporting. That change should leave everything unchanged since handleQuit already handles saving the sketch position (

public boolean handleQuit() {
// If quit is canceled, this will be replaced anyway
// by a later handleQuit() that is not canceled.
storeScreenDimensions();
storeSketches();
try {
).
I'll take a closer look and get back to you.

@facchinm
Copy link
Member

facchinm commented Jan 2, 2019

The breaking change is 36da22c (and is only triggered when closing the IDE with the x and not via File/Quit).
I'll prepare a patch immediately.

facchinm added a commit to facchinm/Arduino that referenced this issue Jan 2, 2019
Only OSX needs the "app" to stay open after handleQuit and to remove the editor windows when called.

Fixes arduino#8337
@facchinm
Copy link
Member

facchinm commented Jan 2, 2019

I opened #8349 to fix this; as soon as the builds are available I'd ask you to try it and report if the fix is ok.

@vimes666
Copy link
Author

vimes666 commented Jan 2, 2019

Thanks for the swift response!
I tested http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8349-BUILD-817-linux64.tar.xz just now and the problem seems to be solved :)
As for windows, I dont know, my latest working version is 98. Someone else will have to test that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants