Author: mordante
Date: Sun May 24 15:49:34 2009
New Revision: 35875

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35875&view=rev
Log:
Add some more assertions.

Modified:
    trunk/src/gui/widgets/widget.cpp

Modified: trunk/src/gui/widgets/widget.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.cpp?rev=35875&r1=35874&r2=35875&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.cpp (original)
+++ trunk/src/gui/widgets/widget.cpp Sun May 24 15:49:34 2009
@@ -185,6 +185,8 @@
 
 void twidget::draw_background(surface& frame_buffer)
 {
+       assert(visible_ == VISIBLE);
+
        if(drawing_action_ == PARTLY_DRAWN) {
                clip_rect_setter clip(frame_buffer, clip_rect_);
                impl_draw_background(frame_buffer);
@@ -195,6 +197,8 @@
 
 void twidget::draw_children(surface& frame_buffer)
 {
+       assert(visible_ == VISIBLE);
+
        if(drawing_action_ == PARTLY_DRAWN) {
                clip_rect_setter clip(frame_buffer, clip_rect_);
                impl_draw_children(frame_buffer);
@@ -205,6 +209,8 @@
 
 void twidget::draw_foreground(surface& frame_buffer)
 {
+       assert(visible_ == VISIBLE);
+
        if(drawing_action_ == PARTLY_DRAWN) {
                clip_rect_setter clip(frame_buffer, clip_rect_);
                impl_draw_foreground(frame_buffer);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to