mail[Wesnoth-commits] r28796 - in /trunk/src/gui/widgets: control.cpp listbox.cpp widget.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on August 20, 2008 - 19:56:
Author: mordante
Date: Wed Aug 20 19:45:12 2008
New Revision: 28796

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28796&view=rev
Log:
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.

Modified:
    trunk/src/gui/widgets/control.cpp
    trunk/src/gui/widgets/listbox.cpp
    trunk/src/gui/widgets/widget.hpp

Modified: trunk/src/gui/widgets/control.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/control.cpp?rev=28796&r1=28795&r2=28796&view=diff
==============================================================================
--- trunk/src/gui/widgets/control.cpp (original)
+++ trunk/src/gui/widgets/control.cpp Wed Aug 20 19:45:12 2008
@@ -144,7 +144,6 @@
                restorer_ = 0;
        }
 
-       set_dirty(false);
        SDL_Rect rect = get_rect();
 
        if(!visible_) {

Modified: trunk/src/gui/widgets/listbox.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/listbox.cpp?rev=28796&r1=28795&r2=28796&view=diff
==============================================================================
--- trunk/src/gui/widgets/listbox.cpp (original)
+++ trunk/src/gui/widgets/listbox.cpp Wed Aug 20 19:45:12 2008
@@ -365,13 +365,6 @@
        // 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);
        }

Modified: trunk/src/gui/widgets/widget.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.hpp?rev=28796&r1=28795&r2=28796&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.hpp (original)
+++ trunk/src/gui/widgets/widget.hpp Wed Aug 20 19:45:12 2008
@@ -362,7 +362,10 @@
        /**
         *  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.
         *




Related Messages


Powered by MHonArc, Updated Wed Aug 20 20:01:56 2008