mail[Wesnoth-commits] r33651 - /trunk/src/mouse_events.cpp


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

Header


Content

Posted by AI0867 on March 14, 2009 - 19:25:
Author: ai0867
Date: Sat Mar 14 19:25:57 2009
New Revision: 33651

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33651&view=rev
Log:
Stop an [end_turn] in a moveto event triggered by an attackmove from 
disabling the GUI. (bug #12714)

Modified:
    trunk/src/mouse_events.cpp

Modified: trunk/src/mouse_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=33651&r1=33650&r2=33651&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Sat Mar 14 19:25:57 2009
@@ -500,8 +500,16 @@
        current_route_.steps.clear();
 
        attackmove_ = attackmove;
-       const size_t moves = ::move_unit(&gui(),map_,units_,teams_,
+       size_t moves = 0;
+       try{
+               moves = ::move_unit(&gui(),map_,units_,teams_,
                           
steps,&recorder,&undo_stack_,&next_unit_,false,check_shroud);
+       } catch(end_turn_exception&) {
+               attackmove_ = false;
+               cursor::set(cursor::NORMAL);
+               gui().invalidate_game_status();
+               throw;
+       }
        attackmove_ = false;
 
        cursor::set(cursor::NORMAL);




Related Messages


Powered by MHonArc, Updated Sat Mar 14 21:00:17 2009