The proper fix for the listbox hack of yesterday.

The twindow::draw() clears the dirty flag at the proper time so
widgets shouldn't do it anymore.
This commit is contained in:
Mark de Wever 2008-08-20 17:45:12 +00:00
parent ce48025f87
commit 1d41706a48
3 changed files with 4 additions and 9 deletions

View file

@ -144,7 +144,6 @@ void tcontrol::draw(surface& surface, const bool force,
restorer_ = 0;
}
set_dirty(false);
SDL_Rect rect = get_rect();
if(!visible_) {

View file

@ -365,13 +365,6 @@ void tlistbox::draw(surface& surface, const bool force,
// Inherited.
tcontainer_::draw(surface, force, invalidate_background);
/**
* @todo there seems to be a redraw bug with the scrollbar. Since we're in
* a rush for a release just force a redraw. The buttons are also broken
* but less important so leave them.
*/
scrollbar()->draw(surface, true, true);
if(invalidate_background) {
list_background_.assign(NULL);
}

View file

@ -362,7 +362,10 @@ public:
/**
* Draws a widget.
*
* The widget is (rather should) only (be) drawn if dirty.
* The widget is (rather should) only (be) drawn if dirty. Note when a
* widget draws itself it shouldn't clear the dirty flag. This should be
* done by the toplevel window that issued the draw. This to avoid
* inherited functions to clear the dirty flag too early.
*
* @todo add force as parameter.
*