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

Editor: recreate GeneralSettings and DefaultSetup documents when a new game is opened #2221

Merged

Conversation

ivan-mogilko
Copy link
Contributor

Fix #1005

This makes GeneralSettings and DefaultSetup behave consistently with the other unique persistent panels (such as GlobalVariables, LipSync, etc), and get recreated when the new game is opened. This fixes them in case CurrentGame reference has changed in the editor.

In practice this fixes editor not acting properly after importing a pre-3.* game.

This is done to make handlers less reliant on global CurrentGame, and because currently this event may potentially be called before the new CurrentGame is assigned.
This makes GeneralSettings and DefaultSetup panes follow similar rule as other panels that also get recreated on game data refresh, updating from the new CurrentGame reference.
In practice this fixes wrong settings displayed after importing an old pre-3.* project.
@ivan-mogilko ivan-mogilko force-pushed the 361--fiximportoldproject2 branch from 61e1362 to b29c68b Compare November 10, 2023 13:54
@ivan-mogilko
Copy link
Contributor Author

@Crystal-Shard, if you like to test this, the editor build may be got from here:
https://cirrus-ci.com/task/6176499896680448

@Crystal-Shard
Copy link

Yes, that works for me.

@ivan-mogilko ivan-mogilko merged commit fd491b6 into adventuregamestudio:master Nov 12, 2023
20 checks passed
@ivan-mogilko ivan-mogilko deleted the 361--fiximportoldproject2 branch November 12, 2023 15:19
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.

General Settings do not work correctly at first after importing a pre-3.* game project
2 participants