Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-11-05 20:46:00 +0300
committerJulian Eisel <julian@blender.org>2021-11-05 21:00:10 +0300
commit8d2a0d9b4cc3d08e0b58bf5acd27388fc34ae639 (patch)
treefb222c275a51a03bbabe27b4e0704b03dc0685ca /source/blender/blenloader/intern/versioning_userdef.c
parentcc49c479a746314d9620d84e5513f08b2faeea71 (diff)
UI: Apply recent theme fixes for Preferences saved in 3.1 builds
Followup to e65230f0c03c. Pablo and I decided it's fine to reset themes again when saved with the recent 3.1 builds. This needed to be done a bit careful, since a normal version patch resetting the theme would've reset the theme for anybody opening preferences of a 3.0 build (even the final release build) in a 3.1 build. So make sure the theme is at least from a 3.1 build (but not newer then this commit of course).
Diffstat (limited to 'source/blender/blenloader/intern/versioning_userdef.c')
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 473a7e413ce..2d5d6479234 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -321,11 +321,16 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
btheme->space_node.grid_levels = 7;
}
- if (!USER_VERSION_ATLEAST(300, 40)) {
+ if (!USER_VERSION_ATLEAST(300, 41)) {
memcpy(btheme, &U_theme_default, sizeof(*btheme));
}
- if (!USER_VERSION_ATLEAST(300, 41)) {
+ /* Again reset the theme, but only if stored with an early 3.1 alpha version. Some changes were
+ * done in the release branch and then merged into the 3.1 branch (master). So the previous reset
+ * wouldn't work for people who saved their preferences with a 3.1 build meanwhile. But we still
+ * don't want to reset theme changes stored in the eventual 3.0 release once opened in a 3.1
+ * build. */
+ if (userdef->versionfile > 300 && !USER_VERSION_ATLEAST(301, 1)) {
memcpy(btheme, &U_theme_default, sizeof(*btheme));
}