diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-09-18 14:07:17 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-09-18 14:07:17 +0400 |
commit | b247e19ff10c74c756ec94b3d4f910383190f172 (patch) | |
tree | 703c16f7c890aae6a67543bf412c51a386e79eb5 /source/blender/editors/sculpt_paint/paint_ops.c | |
parent | e6271d236752b8551d8d401ff6aff8e92efde18e (diff) |
Palettes
* Remove some duplication in deletion code
* Fix crash when restoring file from last saved state.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 90161fa87dd..9eaaf5fe122 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -228,8 +228,9 @@ static int palette_color_delete_exec(bContext *C, wmOperator *UNUSED(op)) { Paint *paint = BKE_paint_get_active_from_context(C); Palette *palette = paint->palette; + PaletteColor *color = BLI_findlink(&palette->colors, palette->active_color); - BKE_palette_color_delete(palette); + BKE_palette_color_remove(palette, color); return OPERATOR_FINISHED; } |