Sequencer: show color sample line in image display mode only

This commit is contained in:
2012-09-05 14:11:22 +00:00
parent 9ca25136a1
commit c1dc375379

View File

@@ -162,8 +162,12 @@ static void sample_exit(bContext *C, wmOperator *op)
static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
SpaceSeq *sseq = CTX_wm_space_seq(C);
ImageSampleInfo *info;
if (sseq->mainb != SEQ_DRAW_IMG_IMBUF)
return OPERATOR_CANCELLED;
info = MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo");
info->art = ar->type;
info->draw_handle = ED_region_draw_cb_activate(ar->type, sample_draw, info, REGION_DRAW_POST_PIXEL);