summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();