Author: ilor
Date: Thu Sep 25 23:11:50 2008
New Revision: 29684
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29684&view=rev
Log:
fix yet-another editor2 issue with the starting position tool, caused by the
the mouse action getting an "up" event on dialog close
Modified:
trunk/src/editor2/mouse_action.cpp
trunk/src/editor2/mouse_action.hpp
Modified: trunk/src/editor2/mouse_action.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/mouse_action.cpp?rev=29684&r1=29683&r2=29684&view=diff
==============================================================================
--- trunk/src/editor2/mouse_action.cpp (original)
+++ trunk/src/editor2/mouse_action.cpp Thu Sep 25 23:11:50 2008
@@ -357,6 +357,8 @@
editor_action* mouse_action_starting_position::up_left(editor_display& disp,
int x, int y)
{
+ if (!click_) return NULL;
+ click_ = false;
gamemap::location hex = disp.hex_clicked_on(x, y);
if (!disp.map().on_board(hex)) {
return NULL;
@@ -387,6 +389,7 @@
editor_action* mouse_action_starting_position::click_left(editor_display&
/*disp*/, int /*x*/, int /*y*/)
{
+ click_ = true;
return NULL;
}
Modified: trunk/src/editor2/mouse_action.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/mouse_action.hpp?rev=29684&r1=29683&r2=29684&view=diff
==============================================================================
--- trunk/src/editor2/mouse_action.hpp (original)
+++ trunk/src/editor2/mouse_action.hpp Thu Sep 25 23:11:50 2008
@@ -366,7 +366,7 @@
{
public:
mouse_action_starting_position(const CKey& key)
- : mouse_action(key)
+ : mouse_action(key), click_(false)
{
}
@@ -387,6 +387,9 @@
editor_action* click_right(editor_display& disp, int x, int y);
virtual void set_mouse_overlay(editor_display& disp);
+
+private:
+ bool click_;
};
} //end namespace editor2
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits