Fix [#22473] No more text cursor placing when editing a Text Field ?
authorMatt Ebb <matt@mke3.net>
Tue, 1 Jun 2010 23:06:14 +0000 (23:06 +0000)
committerMatt Ebb <matt@mke3.net>
Tue, 1 Jun 2010 23:06:14 +0000 (23:06 +0000)
source/blender/editors/interface/interface_handlers.c

index 4e3ffad48aec26b77790c6421baf6e5f9c7553e5..1f9c2bb9ce088e1a56e5a99ce1cf321875901702 100644 (file)
@@ -176,6 +176,7 @@ typedef struct uiAfterFunc {
        int autokey;
 } uiAfterFunc;
 
+static int ui_but_contains_pt(uiBut *but, int mx, int my);
 static int ui_mouse_inside_button(ARegion *ar, uiBut *but, int x, int y);
 static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState state);
 static int ui_handler_region_menu(bContext *C, wmEvent *event, void *userdata);
@@ -1659,7 +1660,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
                                my= event->y;
                                ui_window_to_block(data->region, block, &mx, &my);
 
-                               if (ui_mouse_inside_button(data->region, but, mx, my)) {
+                               if (ui_but_contains_pt(but, mx, my)) {
                                        ui_textedit_set_cursor_pos(but, data, mx);
                                        but->selsta = but->selend = but->pos;
                                        data->selstartx= mx;