Skip to content
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

Do not overwrite Editor Profile on every load #458

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

peedeeboy
Copy link
Contributor

@peedeeboy peedeeboy commented Jan 22, 2023

Fixes #457

In order to get FlatLaf Dark to work "first time" without needing an IDE reset to fix the colours of the Option header bar etc. I had to move setting the default LaF from the static initialisation block to the validate() lifecycle hook.

Setting the Editor profile doesn't work in the validate() block though (too early in IDE startup), so I moved it to the restored() lifecycle hook which gets called later - completely missing that it was no longer behind an if so Editor profile was getting set to Dark Monkey colours every time the IDE started.

This fixes that by setting a static boolean so that we only set the Editor profile if we are also setting the default LaF (i.e. the first time we load the darkmonkey module).

Copy link
Contributor

@neph1 neph1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 👍

@neph1 neph1 merged commit 1c782b5 into jMonkeyEngine:master Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor color profile stuck to Dark Monkey
2 participants