fix [#35488] Toggle "Show All Layers"

This commit is contained in:
Campbell Barton
2013-05-23 21:24:56 +00:00
parent ab2cfd87e0
commit 902e3ddd11
2 changed files with 6 additions and 4 deletions

View File

@@ -137,16 +137,17 @@ static int view3d_layers_exec(bContext *C, wmOperator *op)
if (nr == 0) {
/* all layers */
if (!v3d->layact)
v3d->layact = 1;
if (!v3d->lay_prev)
v3d->lay_prev = 1;
if (toggle && v3d->lay == ((1 << 20) - 1)) {
/* return to active layer only */
v3d->lay = v3d->layact;
v3d->lay = v3d->lay_prev;
view3d_layers_editmode_ensure(scene, v3d);
}
else {
v3d->lay_prev = v3d->lay;
v3d->lay |= (1 << 20) - 1;
}
}

View File

@@ -163,8 +163,9 @@ typedef struct View3D {
float bundle_size; /* size of bundles in reconstructed data */
char bundle_drawtype; /* display style for bundle */
char pad[7];
char pad[3];
unsigned int lay_prev; /* for active layer toggle */
unsigned int lay_used; /* used while drawing */
short persp DNA_DEPRECATED;