Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the mouse handler respect linger mode instead of assuming false.

Fixes bug #21450, restoring functionality lost in commit
7e46df9.
  • Loading branch information...
commit 3b69ba802bd69b5bcb96d6fe95622396442c2303 1 parent 4ae8e5f
@Ja-MiT Ja-MiT authored
View
2  changelog
@@ -3,6 +3,8 @@ Version 1.11.10+dev:
* Updated translations:
* WML engine:
* Bug #21643: Removing fog from a single hex no longer makes the hex ugly.
+ * Miscellaneous and bug fixes:
+ * Units can no longer be moved in linger mode (bug #21450).
Version 1.11.10:
* Add-ons client:
View
2  players_changelog
@@ -5,6 +5,8 @@ changelog: https://github.com/wesnoth/wesnoth-old/blob/master/changelog
Version 1.11.10+dev:
* Language and i18n:
* Updated translations:
+ * Miscellaneous and bug fixes:
+ * Units can no longer be moved in linger mode (bug #21450).
Version 1.11.10:
View
8 src/mouse_events.cpp
@@ -493,7 +493,7 @@ void mouse_handler::mouse_wheel_right(int /*x*/, int /*y*/, const bool /*browse*
resources::controller->set_button_state(*gui_);
}
-void mouse_handler::select_or_action()
+void mouse_handler::select_or_action(bool browse)
{
if (!resources::game_map->on_board(last_hex_))
return;
@@ -505,13 +505,11 @@ void mouse_handler::select_or_action()
|| ((selected_u != resources::units->end() && selected_u->side() != side_num_ && clicked_u != resources::units->end())) )
select_hex(last_hex_, false);
else
- move_action();
+ move_action(browse);
}
-void mouse_handler::move_action()
+void mouse_handler::move_action(bool browse)
{
- bool browse = false;
-
// Lock whiteboard activation state to avoid problems due to
// its changing while an animation takes place.
wb::whiteboard_lock wb_lock = resources::whiteboard->get_activation_state_lock();
View
4 src/mouse_events.hpp
@@ -73,9 +73,9 @@ class mouse_handler : public mouse_handler_base {
const bool highlight = true,
const bool fire_event = true);
- void move_action();
+ void move_action(bool browse);
- void select_or_action();
+ void select_or_action(bool browse);
void left_mouse_up(int x, int y, const bool /*browse*/);
void mouse_wheel_up(int x, int y, const bool /*browse*/);
View
4 src/play_controller.cpp
@@ -461,11 +461,11 @@ void play_controller::left_mouse_click(){
}
void play_controller::select_and_action() {
- mouse_handler_.select_or_action();
+ mouse_handler_.select_or_action(browse_);
}
void play_controller::move_action(){
- mouse_handler_.move_action();
+ mouse_handler_.move_action(browse_);
}
void play_controller::deselect_hex(){
Please sign in to comment.
Something went wrong with that request. Please try again.