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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-06 21:20:59 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-06 21:23:21 +0400
commit19e74f1d4f9bc955c6c7616cadcde65e6f6d2d3d (patch)
treeb7a71a9936971ad0a83591426267b36518c945e1 /source/blender/editors/space_text
parentf04fd5007310bd36fa4b582e1079cdd51adf12db (diff)
Fix T37867: scroll bar in text editor shows the wrong mouse cursor.
Patch by chipgw.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/space_text.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 37f7cf13928..8b0800083d5 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -449,9 +449,16 @@ static void text_main_area_draw(const bContext *C, ARegion *ar)
/* scrollers? */
}
-static void text_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar))
+static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
{
- WM_cursor_set(win, BC_TEXTEDITCURSOR);
+ SpaceText *st = sa->spacedata.first;
+ int wmcursor = BC_TEXTEDITCURSOR;
+
+ if(st->text && BLI_rcti_isect_pt(&st->txtbar, win->eventstate->x - ar->winrct.xmin, st->txtbar.ymin)) {
+ wmcursor = CURSOR_STD;
+ }
+
+ WM_cursor_set(win, wmcursor);
}
@@ -570,6 +577,7 @@ void ED_spacetype_text(void)
art->init = text_main_area_init;
art->draw = text_main_area_draw;
art->cursor = text_cursor;
+ art->event_cursor = TRUE;
BLI_addhead(&st->regiontypes, art);