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>2010-03-03 21:49:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-03 21:49:26 +0300
commit5de69e9545d2f3fa2e694c757a9ccf08fafe58eb (patch)
tree7d3ad4231726f244f8cf61174918d456f56e3e91 /source/blender/editors/object/object_add.c
parentf09efddcda8f83b5cbee31fccb63ac0864bad82a (diff)
[#21436] Do not set BASACT to NULL when new base wasn't created in convert_exec
by Sergey Sharybin (nazgul) (from the patch) When new base wasn't created in convert_exec() function. BASACT will set to NULL, which is not convenient. For example, u can't enter edit mode after converting curve to mesh. Now BASACT changes only if base for active object was changed.
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r--source/blender/editors/object/object_add.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index f0aaef63c68..7620d503f49 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1348,9 +1348,6 @@ static int convert_exec(bContext *C, wmOperator *op)
}
mball_to_mesh(&ob->disp, ob1->data);
-
- /* So we can see the wireframe */
- BASACT= basen; // XXX hm
}
else
continue;
@@ -1362,7 +1359,9 @@ static int convert_exec(bContext *C, wmOperator *op)
if(basen) {
if(ob == obact) {
ED_base_object_activate(C, basen);
- basact = basen;
+
+ /* store new active base to update BASACT */
+ basact= basen;
}
basen= NULL;
@@ -1382,12 +1381,13 @@ static int convert_exec(bContext *C, wmOperator *op)
if(!keep_original)
DAG_scene_sort(scene);
- /* texspace and normals */
- if(!basen) BASACT= NULL; // XXX base;
-
// XXX ED_object_enter_editmode(C, 0);
// XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
- BASACT= basact;
+
+ if (basact) {
+ /* active base was changed */
+ BASACT= basact;
+ }
DAG_scene_sort(scene);
WM_event_add_notifier(C, NC_SCENE|NC_OBJECT|ND_DRAW, scene); /* is NC_SCENE needed ? */