summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-12-24 14:52:42 +0000
committeralberth <alberth@openttd.org>2010-12-24 14:52:42 +0000
commite930b9985d8b12a8b71d69c7897733626e4704c2 (patch)
tree33bb06f5fbf3f104b63139cbeab0b3ed933adf1f /src
parentcdae336febf896c7c8f00dc0098bfaf5fe7a217f (diff)
downloadopenttd-e930b9985d8b12a8b71d69c7897733626e4704c2.tar.xz
(svn r21620) -Codechange: Don't consider direction bits when checking for an active highlight mode.
Diffstat (limited to 'src')
-rw-r--r--src/viewport.cpp2
-rw-r--r--src/window.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 34709cd71..c3608d0cc 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2840,7 +2840,7 @@ void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Wind
void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num)
{
/* undo clicking on button and drag & drop */
- if (_thd.place_mode != HT_NONE || _special_mouse_mode == WSM_DRAGDROP) {
+ if ((_thd.place_mode & ~HT_DIR_MASK) != HT_NONE || _special_mouse_mode == WSM_DRAGDROP) {
Window *w = FindWindowById(_thd.window_class, _thd.window_number);
if (w != NULL) {
/* Call the abort function, but set the window class to something
diff --git a/src/window.cpp b/src/window.cpp
index 5e0242839..e9b7e6748 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -653,7 +653,7 @@ void Window::DeleteChildWindows(WindowClass wc) const
*/
Window::~Window()
{
- if (_thd.place_mode != HT_NONE &&
+ if ((_thd.place_mode & ~HT_DIR_MASK) != HT_NONE &&
_thd.window_class == this->window_class &&
_thd.window_number == this->window_number) {
ResetObjectToPlace();