diff --git a/source/blender/src/drawtime.c b/source/blender/src/drawtime.c index 1a2547b2aec..5915c1aaf83 100644 --- a/source/blender/src/drawtime.c +++ b/source/blender/src/drawtime.c @@ -32,6 +32,7 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include @@ -148,19 +149,22 @@ static void draw_marker(TimeMarker *marker) glDisable(GL_BLEND); /* and the marker name too, shifted slightly to the top-right */ - if(marker->flag & SELECT) { - BIF_ThemeColor(TH_TEXT_HI); - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 27.0*yspace/ypixels); + if(strlen(marker->name)>0) { + if(marker->flag & SELECT) { + BIF_ThemeColor(TH_TEXT_HI); + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), + ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + } + else { + BIF_ThemeColor(TH_TEXT); + if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra)) + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), + ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + else + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels); + } + BMF_DrawString(G.font, marker->name); } - else { - BIF_ThemeColor(TH_TEXT); - if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra)) - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 27.0*yspace/ypixels); - else - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels); - } - - BMF_DrawString(G.font, marker->name); } static void draw_markers_time(SpaceTime *stime)