summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-17 12:21:05 +0000
committersmatz <smatz@openttd.org>2008-02-17 12:21:05 +0000
commit291931bf5078e407d89046e7e2d92e0dcf261730 (patch)
tree22ddea3397fca7768e35d1a7ca62b9d0b33149c2 /src/viewport.cpp
parent16e23a75febeb32efad491c4916315ef9cfd73d4 (diff)
downloadopenttd-291931bf5078e407d89046e7e2d92e0dcf261730.tar.xz
(svn r12166) -Fix [FS#337]: when drag&drop mode was cancelled by keyboard input, depot/group window wasn't updated (original patch by GrimRC)
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index f4c20c3e5..cc7b7a519 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -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);
}