diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-07 13:25:39 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-07 13:25:39 +0400 |
commit | 31433a380982cfa15adb04b5483981f00a1c6b22 (patch) | |
tree | fd05fe2de9cdd596d55997bbec19ffd769fc78f9 /source/blender/editors/space_image/image_ops.c | |
parent | 51a7089bea11db9118ce6251ff0645bf5f69a184 (diff) |
Fix #36981, Removing Sample line fails during render.
The SAMPLELINE flag in histogram was set during the BKE_histogram_update_sample_line function. That function in turn is called during every scope update in area draw function, meaning that during render
it constantly gets set. OTOH the operator tries to disable the flag on invoke, which "cancels" the sample line by default. So during render the operator un-setting of the flag has no effect, because the
render job immediatly triggers a redraw, which updates scopes and sets it again.
Moved the flag out of the actual sample line update function into the operator execute. Now only the operator enables/disables overall sample line drawing, while the rest of the update works as before.
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index a7dee3fab93..710d5c8cd81 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2417,6 +2417,9 @@ static int image_sample_line_exec(bContext *C, wmOperator *op) hist->co[1][0] = x2f; hist->co[1][1] = y2f; + /* enable line drawing */ + hist->flag |= HISTO_FLAG_SAMPLELINE; + BKE_histogram_update_sample_line(hist, ibuf, &scene->view_settings, &scene->display_settings); /* reset y zoom */ |