mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Game settings loading is now deferred until the game is fully loading.
This allows auto replaces to be properly loaded from the game file. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1295 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -81,7 +81,11 @@ GameSettings::GameSettings()
|
||||
{}
|
||||
|
||||
void GameSettings::initDefaults(const Game& game) {
|
||||
if (initialized) return;
|
||||
// Defer initialization until the game is fully loaded.
|
||||
// This prevents data that needs to be initialized from
|
||||
// being accessed from the new set window, but removes
|
||||
// the need to load the entire file, which takes too long.
|
||||
if (initialized || !game.isFullyLoaded()) return;
|
||||
initialized = true;
|
||||
// init auto_replaces, copy from game file
|
||||
FOR_EACH_CONST(ar, game.auto_replaces) {
|
||||
|
||||
Reference in New Issue
Block a user