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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-26 14:12:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-26 14:12:03 +0400
commitb757e5c944a37d1698cf73d2a973940c8efe5a3e (patch)
tree27e8329c68a45cd31dbae9c3752280a4d2b410a9 /source/blender/blenloader
parent2785bc1aefc0e8fb69a940e0fa70769bc2db4eab (diff)
Fix #22086 and #22125: crashes due to editmode being set on load/undo, fixes
are simple enough, though may still revert this feature if it turns out there are more problems.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 71c09917c46..f7dcbee79be 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3897,6 +3897,11 @@ static void direct_link_object(FileData *fd, Object *ob)
/* weak weak... this was only meant as draw flag, now is used in give_base too */
ob->flag &= ~OB_FROMGROUP;
+
+ /* loading saved files with editmode enabled works, but for undo we like
+ to stay in object mode during undo presses so keep editmode disabled */
+ if(fd->memfile)
+ ob->mode &= ~(OB_MODE_EDIT|OB_MODE_PARTICLE_EDIT);
ob->disp.first=ob->disp.last= NULL;