Author: alink
Date: Wed Jun 18 12:12:33 2008
New Revision: 27278
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27278&view=rev
Log:
* fix false move-cursor around enemies after some dialog events.
Modified:
trunk/changelog
trunk/src/mouse_events.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=27278&r1=27277&r2=27278&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Wed Jun 18 12:12:33 2008
@@ -160,6 +160,7 @@
* Fix various rendering bugs in 8bpp display mode.
* fix bug #11630 (preventing redo and rename during opponent's turn).
* fix a regression about missing default portrait in dialogs.
+ * fix false move-cursor around enemies after some dialog events.
Version 1.5.0:
* campaigns:
Modified: trunk/src/mouse_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=27278&r1=27277&r2=27278&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Wed Jun 18 12:12:33 2008
@@ -796,9 +796,19 @@
}
}
-
-
+ // reset current_route_ and current_paths if not valid anymore
+ // we do it before cursor selection, because it uses
current_paths_
if(new_hex.valid() == false) {
+ current_route_.steps.clear();
+ (*gui_).set_route(NULL);
+ }
+
+ if(enemy_paths_) {
+ enemy_paths_ = false;
+ current_paths_ = paths();
+ gui_->unhighlight_reach();
+ } else if(over_route_) {
+ over_route_ = false;
current_route_.steps.clear();
(*gui_).set_route(NULL);
}
@@ -837,16 +847,6 @@
gui_->set_attack_indicator(attack_from, new_hex);
} else {
gui_->clear_attack_indicator();
- }
-
- if(enemy_paths_) {
- enemy_paths_ = false;
- current_paths_ = paths();
- gui_->unhighlight_reach();
- } else if(over_route_) {
- over_route_ = false;
- current_route_.steps.clear();
- (*gui_).set_route(NULL);
}
// the destination is the pointed hex or the adjacent hex
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits