Commit: 284e0ea756854e3d8388b2cd89666923975cbf10
Author: Philipp Oeser
Date:   Fri Jun 15 10:25:18 2018 +0200
Branches: master
https://developer.blender.org/rB284e0ea756854e3d8388b2cd89666923975cbf10

Fix (unreported) Text Editor: scrollbar exiting early

caused by recent clickdrag changes

===================================================================

M       source/blender/editors/space_text/text_ops.c

===================================================================

diff --git a/source/blender/editors/space_text/text_ops.c 
b/source/blender/editors/space_text/text_ops.c
index de5ff36f462..52440be4c4b 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -2243,13 +2243,15 @@ static int text_scroll_modal(bContext *C, wmOperator 
*op, const wmEvent *event)
                case LEFTMOUSE:
                case RIGHTMOUSE:
                case MIDDLEMOUSE:
-                       if (ELEM(tsc->zone, SCROLLHANDLE_MIN_OUTSIDE, 
SCROLLHANDLE_MAX_OUTSIDE)) {
-                               txt_screen_skip(st, ar, st->viewlines * 
(tsc->zone == SCROLLHANDLE_MIN_OUTSIDE ? 1 : -1));
+                       if (event->val == KM_RELEASE) {
+                               if (ELEM(tsc->zone, SCROLLHANDLE_MIN_OUTSIDE, 
SCROLLHANDLE_MAX_OUTSIDE)) {
+                                       txt_screen_skip(st, ar, st->viewlines * 
(tsc->zone == SCROLLHANDLE_MIN_OUTSIDE ? 1 : -1));
 
-                               ED_area_tag_redraw(CTX_wm_area(C));
+                                       ED_area_tag_redraw(CTX_wm_area(C));
+                               }
+                               scroll_exit(C, op);
+                               return OPERATOR_FINISHED;
                        }
-                       scroll_exit(C, op);
-                       return OPERATOR_FINISHED;
        }
 
        return OPERATOR_RUNNING_MODAL;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to