mail[Wesnoth-commits] r36659 - /trunk/src/gui/widgets/generator_private.hpp


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

Header


Content

Posted by koraq on July 06, 2009 - 22:13:
Author: mordante
Date: Mon Jul  6 22:13:34 2009
New Revision: 36659

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36659&view=rev
Log:
Deselect items before deleting them.

Just to make sure that multi-select generators get properly deselected.

Modified:
    trunk/src/gui/widgets/generator_private.hpp

Modified: trunk/src/gui/widgets/generator_private.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/generator_private.hpp?rev=36659&r1=36658&r2=36659&view=diff
==============================================================================
--- trunk/src/gui/widgets/generator_private.hpp (original)
+++ trunk/src/gui/widgets/generator_private.hpp Mon Jul  6 22:13:34 2009
@@ -544,6 +544,13 @@
        {
                assert(index < items_.size());
 
+               // Might be other parts of the engine want to know about the
+               // deselction, if minimum fails it gets another chance later 
on,
+               // since it deletes the item.
+               if(is_selected(index)) {
+                       select_item(index, false);
+               }
+
                minimum_selection::delete_item(index);
 
                delete items_[index];




Related Messages


Powered by MHonArc, Updated Mon Jul 06 22:20:18 2009