diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-03-26 23:17:50 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-03-26 23:17:50 +0300 |
commit | 5183788fd6376db26182c88a2d8e2f7e300d5cc3 (patch) | |
tree | 7c0c4c2b85765214e102f0dcad130aed8075b499 /source/blender/blenkernel/intern/brush.c | |
parent | 0599a5646887fa7b2ac20b027c697356ce34c408 (diff) |
Fix for bug #8746: the fake user button for datablocks was not a toggle
button, while it should be.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index ca2f7b114d5..18d56f40d8e 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -73,7 +73,8 @@ Brush *add_brush(char *name) brush->clone.alpha= 0.5; /* enable fake user by default */ - brush_toggle_fake_user(brush); + brush->id.flag |= LIB_FAKEUSER; + brush_toggled_fake_user(brush); return brush; } @@ -95,8 +96,10 @@ Brush *copy_brush(Brush *brush) } /* enable fake user by default */ - if (!(brushn->id.flag & LIB_FAKEUSER)) - brush_toggle_fake_user(brushn); + if (!(brushn->id.flag & LIB_FAKEUSER)) { + brushn->id.flag |= LIB_FAKEUSER; + brush_toggled_fake_user(brushn); + } return brushn; } @@ -148,8 +151,10 @@ void make_local_brush(Brush *brush) new_id(0, (ID *)brush, 0); /* enable fake user by default */ - if (!(brush->id.flag & LIB_FAKEUSER)) - brush_toggle_fake_user(brush); + if (!(brush->id.flag & LIB_FAKEUSER)) { + brush->id.flag |= LIB_FAKEUSER; + brush_toggled_fake_user(brush); + } } else if(local && lib) { brushn= copy_brush(brush); @@ -203,16 +208,14 @@ int brush_delete(Brush **current_brush) return 0; } -void brush_toggle_fake_user(Brush *brush) +void brush_toggled_fake_user(Brush *brush) { ID *id= (ID*)brush; if(id) { if(id->flag & LIB_FAKEUSER) { - id->flag -= LIB_FAKEUSER; - id->us--; - } else { - id->flag |= LIB_FAKEUSER; id_us_plus(id); + } else { + id->us--; } } } |