diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-13 03:04:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-13 03:04:05 +0400 |
commit | a53e864cf4b5f2a37f34602469c0998ec7cd5ad4 (patch) | |
tree | b97b80cbe53abcc3c025bd61e2abf0e1f9f0aeca /source/blender/blenloader/intern | |
parent | 51b9d85b091cbc31d73968f0652e59dd83247ca2 (diff) |
Fix T37572: text editor scrolling not working well with Mac trackpad panning.
The trackpad would give isolated mouse pan events with a distance smaller than
one line or character. For other 2D views this is all accumulated in floats,
but in the text editor it only keeps track of integers, and the small mouse pan
events got lost due to rounding.
Now it keeps track of sub-line or sub-character scroll offsets to avoid this.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e51b3a6f27e..37d2ec787ed 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6414,7 +6414,9 @@ static bool direct_link_screen(FileData *fd, bScreen *sc) else if (sl->spacetype == SPACE_TEXT) { SpaceText *st= (SpaceText *)sl; - st->drawcache= NULL; + st->drawcache = NULL; + st->scroll_accum[0] = 0.0f; + st->scroll_accum[1] = 0.0f; } else if (sl->spacetype == SPACE_TIME) { SpaceTime *stime = (SpaceTime *)sl; |