1
0
Fork 0

(svn r21620) -Codechange: Don't consider direction bits when checking for an active highlight mode.

release/1.1
alberth 2010-12-24 14:52:42 +00:00
parent cdae336feb
commit e930b9985d
2 changed files with 2 additions and 2 deletions

View File

@ -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) void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num)
{ {
/* undo clicking on button and drag & drop */ /* 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); Window *w = FindWindowById(_thd.window_class, _thd.window_number);
if (w != NULL) { if (w != NULL) {
/* Call the abort function, but set the window class to something /* Call the abort function, but set the window class to something

View File

@ -653,7 +653,7 @@ void Window::DeleteChildWindows(WindowClass wc) const
*/ */
Window::~Window() 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_class == this->window_class &&
_thd.window_number == this->window_number) { _thd.window_number == this->window_number) {
ResetObjectToPlace(); ResetObjectToPlace();