[Bf-blender-cvs] [f67a685ad9f] master: Cleanup: move console scrollback initialization into versioning
Campbell Barton
noreply at git.blender.org
Sun Nov 24 13:05:10 CET 2019
Commit: f67a685ad9f6565a2c7054d73188bd2f3003a6df
Author: Campbell Barton
Date: Sun Nov 24 22:53:16 2019 +1100
Branches: master
https://developer.blender.org/rBf67a685ad9f6565a2c7054d73188bd2f3003a6df
Cleanup: move console scrollback initialization into versioning
===================================================================
M source/blender/blenloader/intern/versioning_userdef.c
M source/blender/editors/space_console/console_ops.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index f20ef8a07b7..ac7fcdd3769 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -674,6 +674,9 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
userdef->view_rotate_sensitivity_turntable = DEG2RADF(0.4f);
userdef->view_rotate_sensitivity_trackball = 1.0f;
}
+ if (userdef->scrollback == 0) {
+ userdef->scrollback = U_default.scrollback;
+ }
/* pass */
}
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 591c3cc62f2..278981d2091 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -86,10 +86,6 @@ static void console_scrollback_limit(SpaceConsole *sc)
{
int tot;
- if (U.scrollback < 32) {
- U.scrollback = 256; // XXX - save in user defaults
- }
-
for (tot = BLI_listbase_count(&sc->scrollback); tot > U.scrollback; tot--) {
console_scrollback_free(sc, sc->scrollback.first);
}
More information about the Bf-blender-cvs
mailing list