[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34644] trunk/blender/source/blender/ editors/space_text/text_ops.c: Fix #25923: Active area of text editor line numbers too big

Sergey Sharybin g.ulairi at gmail.com
Fri Feb 4 17:28:19 CET 2011


Revision: 34644
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34644
Author:   nazgul
Date:     2011-02-04 16:28:19 +0000 (Fri, 04 Feb 2011)
Log Message:
-----------
Fix #25923: Active area of text editor line numbers too big

Area with width 60px was used for determing should we jump to line or
input new cahacter. Reduce this area to actual line numbers margin width.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_text/text_ops.c

Modified: trunk/blender/source/blender/editors/space_text/text_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_ops.c	2011-02-04 16:10:30 UTC (rev 34643)
+++ trunk/blender/source/blender/editors/space_text/text_ops.c	2011-02-04 16:28:19 UTC (rev 34644)
@@ -2576,10 +2576,12 @@
 	static int jump_to= 0;
 	static double last_jump= 0;
 
+	text_update_character_width(st);
+
 	if(!st->showlinenrs)
 		return OPERATOR_PASS_THROUGH;
 
-	if(!(mval[0]>2 && mval[0]<60 && mval[1]>2 && mval[1]<ar->winy-2))
+	if(!(mval[0]>2 && mval[0]<(TXT_OFFSET + TEXTXLOC) && mval[1]>2 && mval[1]<ar->winy-2))
 		return OPERATOR_PASS_THROUGH;
 
 	if(!(event->ascii>='0' && event->ascii<='9'))




More information about the Bf-blender-cvs mailing list