mail[Wesnoth-commits] r43445 - in /trunk/src: mouse_events.cpp whiteboard/manager.cpp


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

Header


Content

Posted by gabrielmorin on June 15, 2010 - 00:59:
Author: gabba
Date: Tue Jun 15 00:59:25 2010
New Revision: 43445

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43445&view=rev
Log:
Whiteboard: stop displaying a temp arrow if unit is deselected

Modified:
    trunk/src/mouse_events.cpp
    trunk/src/whiteboard/manager.cpp

Modified: trunk/src/mouse_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=43445&r1=43444&r2=43445&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Tue Jun 15 00:59:25 2010
@@ -556,6 +556,9 @@
                gui().unhighlight_reach();
                current_paths_ = pathfind::paths();
                current_route_.steps.clear();
+               if (resources::whiteboard->active()) {
+                       resources::whiteboard->erase_temp_move();
+               }
        }
 }
 

Modified: trunk/src/whiteboard/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/manager.cpp?rev=43445&r1=43444&r2=43445&view=diff
==============================================================================
--- trunk/src/whiteboard/manager.cpp (original)
+++ trunk/src/whiteboard/manager.cpp Tue Jun 15 00:59:25 2010
@@ -84,8 +84,11 @@
 
 void manager::erase_temp_move()
 {
-       resources::screen->remove_arrow(*move_arrow_);
-       move_arrow_.reset();
+       if (move_arrow_.get() != NULL)
+       {
+               resources::screen->remove_arrow(*move_arrow_);
+               move_arrow_.reset();
+       }
 }
 
 void manager::save_temp_move(unit& subject)




Related Messages


Powered by MHonArc, Updated Tue Jun 15 01:00:13 2010