[Bf-blender-cvs] [284e0ea7568] master: Fix (unreported) Text Editor: scrollbar exiting early

Philipp Oeser noreply at git.blender.org
Fri Jun 15 10:43:59 CEST 2018


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;



More information about the Bf-blender-cvs mailing list