diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-26 11:32:54 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-26 11:32:54 +0300 |
commit | 6af1f968761b5d94184c68b1ea9dbf88792a1c13 (patch) | |
tree | f07763036d6efefb5737bacc45b612aee97c342e /source | |
parent | 3925f58b6a9b0a2c49ce6d0e3534542a4975139b (diff) |
Fix [#21759] Toggle all layers doesn't work
Toggling all layers will revert back to the active layer.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 558e817157f..e76546c6080 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -159,14 +159,18 @@ static int layers_exec(bContext *C, wmOperator *op) if(nr < 0) return OPERATOR_CANCELLED; - - + if(nr == 0) { /* all layers */ - v3d->lay |= (1<<20)-1; - if(!v3d->layact) v3d->layact= 1; + + if (toggle && v3d->lay == ((1<<20)-1)) { + /* return to active layer only */ + v3d->lay = v3d->layact; + } else { + v3d->lay |= (1<<20)-1; + } } else { int bit; |