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>2007-01-25 19:54:59 +0300
committerTon Roosendaal <ton@blender.org>2007-01-25 19:54:59 +0300
commit13ac854e624d95b09b00ad584e954b16917d430f (patch)
treee2d4c9b13db28ae5c0e40a96324edff39fa6cebb /source/blender/src/editview.c
parent6446c2344749e7ad1ce6d2f3eefc37f7436cc8ac (diff)
Bugfix #5796
Selecting objects using Outliner should also end modes, especially when not provided (like sculpt mode on lamps).
Diffstat (limited to 'source/blender/src/editview.c')
-rw-r--r--source/blender/src/editview.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c
index edf4f09dc41..02b28f1e8d9 100644
--- a/source/blender/src/editview.c
+++ b/source/blender/src/editview.c
@@ -1073,6 +1073,26 @@ void set_active_base(Base *base)
{
Base *tbase;
+ /* activating a non-mesh, should end a couple of modes... */
+ if(base) {
+ if(base->object->type!=OB_MESH) {
+ if(G.f & G_SCULPTMODE) {
+ set_sculptmode();
+ }
+ if(G.f & G_WEIGHTPAINT) {
+ set_wpaint(); /* toggle */
+ }
+ if(G.f & G_VERTEXPAINT) {
+ set_vpaint(); /* toggle */
+ }
+ }
+ /* always end this */
+ if(G.f & G_FACESELECT) {
+ set_faceselect(); /* toggle */
+ }
+ }
+
+ /* sets scene->basact */
BASACT= base;
if(base) {
@@ -1439,7 +1459,7 @@ void mouse_select(void)
basact->object->flag= basact->flag;
if(oldbasact != basact) {
- set_active_base(basact);
+ set_active_base(basact);
}
/* for visual speed, only in wire mode */
@@ -1454,23 +1474,6 @@ void mouse_select(void)
}
}
- /* selecting a non-mesh, should end a couple of modes... */
- if(basact->object->type!=OB_MESH) {
- if(G.f & G_SCULPTMODE) {
- set_sculptmode();
- }
- if(G.f & G_WEIGHTPAINT) {
- set_wpaint(); /* toggle */
- }
- if(G.f & G_VERTEXPAINT) {
- set_vpaint(); /* toggle */
- }
- }
- /* always end this */
- if(G.f & G_FACESELECT) {
- set_faceselect(); /* toggle */
- }
-
allqueue(REDRAWBUTSLOGIC, 0);
allqueue(REDRAWDATASELECT, 0);
allqueue(REDRAWBUTSOBJECT, 0);