if menu is empty, clear it

before this if the only element was removed from menu, it was still displayed.
This commit is contained in:
Andrzej Rybczak
2009-01-22 14:32:42 +01:00
parent c696d68d92
commit 1244223919

View File

@@ -262,7 +262,7 @@ template <class T> void Menu<T>::Refresh()
{ {
if (itsOptions.empty()) if (itsOptions.empty())
{ {
wrefresh(itsWindow); Window::Clear();
return; return;
} }
int MaxBeginning = itsOptions.size() < itsHeight ? 0 : itsOptions.size()-itsHeight; int MaxBeginning = itsOptions.size() < itsHeight ? 0 : itsOptions.size()-itsHeight;