simplify Clear() in Window and its derivatives

it removes argument responsible for immediate refreshing.
since after all calls that were refreshing screen there was
call to Refresh() anyway, this switch doesn't make much sense.
This commit is contained in:
Andrzej Rybczak
2009-11-13 15:59:18 +01:00
parent b83adc01b9
commit 495ec25a0a
17 changed files with 53 additions and 62 deletions

View File

@@ -390,11 +390,9 @@ namespace NCurses
virtual void Scroll(Where where);
/// Cleares all options, used filters etc. It doesn't reset highlighted position though.
/// @param clear_screen indicates whether window has to be cleared imediately or not
/// @see Window::Clear()
/// @see Reset()
///
virtual void Clear(bool clear_screen = 1);
virtual void Clear();
/// Sets the highlighted position to 0
///
@@ -888,7 +886,7 @@ template <typename T> void NCurses::Menu<T>::ClearFiltered()
itsOptionsPtr = &itsOptions;
}
template <typename T> void NCurses::Menu<T>::Clear(bool clear_screen)
template <typename T> void NCurses::Menu<T>::Clear()
{
for (option_iterator it = itsOptions.begin(); it != itsOptions.end(); ++it)
delete *it;
@@ -897,8 +895,7 @@ template <typename T> void NCurses::Menu<T>::Clear(bool clear_screen)
itsFilter.clear();
ClearFiltered();
itsOptionsPtr = &itsOptions;
if (clear_screen)
Window::Clear();
Window::Clear();
}
template <typename T> bool NCurses::Menu<T>::isBold(int pos)