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:
authorTon Roosendaal <ton@blender.org>2012-12-17 18:51:06 +0400
committerTon Roosendaal <ton@blender.org>2012-12-17 18:51:06 +0400
commit95225cf11057a985867f413f17871c53742eb5d0 (patch)
tree9c8ca685b210011cbad0900edc0c2ff36e8f724b /source/blender/editors
parentbf51b85871dd424d8481eb09a9fc217955ed35b1 (diff)
Bug fix, IRC report.
With 2 windows, 2 scenes, linked objects: - enter editmode in 1 window. - the other window allowed to enter editmode too. - and crash happened on exit editmode. Since editmode is in Context (scene->obedit) a bad conflict arises. New function BKE_object_is_in_editmode() returns this info outside of context. Note I didn't use BMEdit_FromObject() because of the assert(). NOTE: contextual storage of editmode could need rework... five places: - ob->mode / ob->restore_mode - scene->object - CTX_data_edit_object() - BKE_object_is_in_editmode() - view3d mode handling menu
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_edit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index d39e34824b9..12edb3e8edb 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -429,6 +429,10 @@ void ED_object_enter_editmode(bContext *C, int flag)
ob = base->object;
+ /* this checks actual object->data, for cases when other scenes have it in editmode context */
+ if ( BKE_object_is_in_editmode(ob) )
+ return;
+
if (BKE_object_obdata_is_libdata(ob)) {
error_libdata();
return;