apply selected item prefix to menu before clearing the line

if selected item prefix turned on a color or other format flag
it should be appended to the whole line, not only the part that
is going to be drawn using item displayer.
This commit is contained in:
Andrzej Rybczak
2009-09-21 01:20:02 +02:00
parent ead5255df1
commit ec18a34513

View File

@@ -743,9 +743,9 @@ template <typename T> void NCurses::Menu<T>::Refresh()
Reverse(1);
*this << itsHighlightColor;
}
mvwhline(itsWindow, line, 0, 32, itsWidth);
if ((*itsOptionsPtr)[i]->isSelected && itsSelectedPrefix)
*this << *itsSelectedPrefix;
mvwhline(itsWindow, line, 0, 32, itsWidth);
if (itsItemDisplayer)
itsItemDisplayer((*itsOptionsPtr)[i]->Item, itsItemDisplayerUserdata, this);
if ((*itsOptionsPtr)[i]->isSelected && itsSelectedSuffix)