diff options
author | alberth <alberth@openttd.org> | 2011-01-16 11:39:57 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2011-01-16 11:39:57 +0000 |
commit | 4a203e8a49b3f09f77ec8258e691745a88edfa56 (patch) | |
tree | 8cf242cc7d608e634151ecdeaf4e4a227507594f /src | |
parent | 1e7c3fd2ff156b635b6de62e2bb1b9ad9b70610b (diff) | |
download | openttd-4a203e8a49b3f09f77ec8258e691745a88edfa56.tar.xz |
(svn r21821) -Codechange: Clean up the jump conditions.
Diffstat (limited to 'src')
-rw-r--r-- | src/window.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/window.cpp b/src/window.cpp index 88a0878f6..89bad77a2 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1431,8 +1431,10 @@ static EventState HandleMouseDragDrop() { Window *w; - if (_special_mouse_mode != WSM_DRAGDROP) goto handle_dragdop; - if (!_left_button_down || (_cursor.delta.x == 0 && _cursor.delta.y == 0)) goto handle_dragdop; + if (_special_mouse_mode != WSM_DRAGDROP) return ES_NOT_HANDLED; + + if (_left_button_down && _cursor.delta.x == 0 && _cursor.delta.y == 0) return ES_HANDLED; // Dragging, but the mouse did not move. + if (!_left_button_down) goto handle_dragdop; w = _thd.GetCallbackWnd(); @@ -1447,9 +1449,6 @@ static EventState HandleMouseDragDrop() return ES_HANDLED; handle_dragdop: - if (_special_mouse_mode != WSM_DRAGDROP) return ES_NOT_HANDLED; - if (_left_button_down) return ES_HANDLED; - w = _thd.GetCallbackWnd(); if (w != NULL) { |