Fix #28937: Text Editor Selection (Scroll Bar)
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 20 Oct 2011 08:19:51 +0000 (08:19 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 20 Oct 2011 08:19:51 +0000 (08:19 +0000)
Do not start selection if mouse cursor.x >= scrollbar.x

source/blender/editors/space_text/text_ops.c

index 8d40550961fbd79ba5114c5b9f0a996d1f73e52d..242bccd2376d5a4369d982396f598497d672fb71 100644 (file)
@@ -2583,6 +2583,9 @@ static int set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
        SpaceText *st= CTX_wm_space_text(C);
        SetSelection *ssel;
 
+       if(event->mval[0]>=st->txtbar.xmin)
+               return OPERATOR_PASS_THROUGH;
+
        op->customdata= MEM_callocN(sizeof(SetSelection), "SetCursor");
        ssel= op->customdata;
        ssel->selecting= RNA_boolean_get(op->ptr, "select");