Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2018-06-15 11:25:18 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-06-15 11:27:30 +0300
commit284e0ea756854e3d8388b2cd89666923975cbf10 (patch)
treeb48d1a0a81a2d2a98aa6a00f3f98b87388a2535d /source/blender/editors/space_text/text_ops.c
parent8148d549bbe8afdbf3116c2083d30ac288ac7a1b (diff)
Fix (unreported) Text Editor: scrollbar exiting early
caused by recent clickdrag changes
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r--source/blender/editors/space_text/text_ops.c12
1 files changed, 7 insertions, 5 deletions
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;