[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31232] trunk/blender/source/blender/ editors/space_text/text_draw.c: error in last commit, line highlighting depended on the cursor.
Campbell Barton
ideasman42 at gmail.com
Wed Aug 11 07:28:44 CEST 2010
Revision: 31232
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31232
Author: campbellbarton
Date: 2010-08-11 07:28:44 +0200 (Wed, 11 Aug 2010)
Log Message:
-----------
error in last commit, line highlighting depended on the cursor.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_text/text_draw.c
Modified: trunk/blender/source/blender/editors/space_text/text_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_draw.c 2010-08-11 05:21:43 UTC (rev 31231)
+++ trunk/blender/source/blender/editors/space_text/text_draw.c 2010-08-11 05:28:44 UTC (rev 31232)
@@ -1101,23 +1101,26 @@
}
}
+ if(st->line_hlight) {
+ /* TODO, dont draw if hidden */
+ int x1= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
+ int x2= x1 + ar->winx;
+ y= ar->winy-2 - vsell*st->lheight;
+
+ glColor4ub(255, 255, 255, 32);
+
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glRecti(x1, y, x2, y-st->lheight+1);
+ glDisable(GL_BLEND);
+ }
+
if(!hidden) {
/* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */
x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
x += vselc*st->cwidth;
y= ar->winy-2 - vsell*st->lheight;
- if(st->line_hlight) {
- int x1= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
- int x2= x1 + ar->winx;
- glColor4ub(255, 255, 255, 32);
-
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
- glRecti(x1, y, x2, y-st->lheight+1);
- glDisable(GL_BLEND);
- }
-
if(st->overwrite) {
char ch= text->sell->line[text->selc];
if(!ch) ch= ' ';
More information about the Bf-blender-cvs
mailing list