(svn r12166) -Fix [FS#337]: when drag&drop mode was cancelled by keyboard input, depot/group window wasn't updated (original patch by GrimRC)

This commit is contained in:
smatz
2008-02-17 12:21:05 +00:00
parent 16e23a75fe
commit 291931bf50
4 changed files with 17 additions and 5 deletions

View File

@@ -2847,9 +2847,8 @@ void SetObjectToPlace(CursorID icon, SpriteID pal, ViewportHighlightMode mode, W
{
Window *w;
/* undo clicking on button */
if (_thd.place_mode != VHM_NONE) {
_thd.place_mode = VHM_NONE;
/* undo clicking on button and drag & drop */
if (_thd.place_mode != VHM_NONE || _special_mouse_mode == WSM_DRAGDROP) {
w = FindWindowById(_thd.window_class, _thd.window_number);
if (w != NULL) CallWindowEventNP(w, WE_ABORT_PLACE_OBJ);
}