Fix issue when empty settings are turned temporary.

This commit is contained in:
Ottermandias 2025-01-11 13:26:43 +01:00
parent e6872cff64
commit d4e6688369

View file

@ -249,9 +249,10 @@ public class ModPanelSettingsTab(
}
else
{
var actual = collectionManager.Active.Current.GetActualSettings(selection.Mod!.Index).Settings;
if (ImUtf8.ButtonEx("Turn Temporary"u8, "Copy the current settings over to temporary settings to experiment with them."u8))
collectionManager.Editor.SetTemporarySettings(collectionManager.Active.Current, selection.Mod!,
new TemporaryModSettings(selection.Settings, "yourself"));
new TemporaryModSettings(actual, "yourself"));
}
}
}