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:
authorCampbell Barton <ideasman42@gmail.com>2020-05-14 07:52:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-14 07:52:07 +0300
commit0cd9b1243cd8d06a68cce7419047fec6b18cfc09 (patch)
tree46fa0dd0906f4d6a22cf46a4289f32049d76bccd /source/blender/blenkernel/intern/undo_system.c
parent95a47ff2269fc97d60cf83a44726d1f49027a882 (diff)
Fix sculpt/paint missing undo-step limiting
Diffstat (limited to 'source/blender/blenkernel/intern/undo_system.c')
-rw-r--r--source/blender/blenkernel/intern/undo_system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index 33a457386e8..e155dedeef0 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -399,7 +399,7 @@ UndoStep *BKE_undosys_stack_init_or_active_with_type(UndoStack *ustack, const Un
void BKE_undosys_stack_limit_steps_and_memory(UndoStack *ustack, int steps, size_t memory_limit)
{
UNDO_NESTED_ASSERT(false);
- if (!(steps || memory_limit)) {
+ if ((steps == -1) && (memory_limit != 0)) {
return;
}
@@ -416,7 +416,7 @@ void BKE_undosys_stack_limit_steps_and_memory(UndoStack *ustack, int steps, size
break;
}
}
- if (steps) {
+ if (steps != -1) {
if (us_count == steps) {
break;
}