STR #2184: bug in Fl_Help_Viewer font stack

src/Fl_Help_View.cxx:
  removed double pushfont() for color changes

FL/Fl_Help_View.H:
  fixed Fl_Help_Font_Stack::pop() to set the correct font


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6741 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2009-04-03 07:31:51 +00:00
parent 37c833ba1f
commit 6534c6675a
2 changed files with 2 additions and 2 deletions

View File

@ -123,9 +123,9 @@ struct Fl_Help_Font_Stack {
}
/** Pops from the stack the font style triplet and calls fl_font() & fl_color() adequately */
void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {
if (nfonts_ > 0) nfonts_ --;
top(f, s, c);
fl_font(f, s); fl_color(c);
if (nfonts_ > 0) nfonts_ --;
}
/** Gets the current count of font style elts in the stack */
size_t count() const {return nfonts_;} /// Gets the current number of fonts in the stack

View File

@ -731,7 +731,7 @@ Fl_Help_View::draw()
else if (strcasecmp(buf, "FONT") == 0)
{
if (get_attr(attrs, "COLOR", attr, sizeof(attr)) != NULL) {
pushfont(font, fsize, (textcolor_ = get_color(attr, textcolor_)) );
textcolor_ = get_color(attr, textcolor_);
}
if (get_attr(attrs, "FACE", attr, sizeof(attr)) != NULL) {