diff options
author | Julian Eisel <julian@blender.org> | 2021-11-05 20:46:00 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-11-05 21:00:10 +0300 |
commit | 8d2a0d9b4cc3d08e0b58bf5acd27388fc34ae639 (patch) | |
tree | fb222c275a51a03bbabe27b4e0704b03dc0685ca /source | |
parent | cc49c479a746314d9620d84e5513f08b2faeea71 (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')
-rw-r--r-- | source/blender/blenkernel/BKE_blender_version.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 6fc2fa37d9f..00934ef2002 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 0 +#define BLENDER_FILE_SUBVERSION 1 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file 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)); } |