Mercurial > hg > openttd
changeset 17084:6f1d1c0828cd draft
(svn r21821) -Codechange: Clean up the jump conditions.
author | alberth <alberth@openttd.org> |
---|---|
date | Sun, 16 Jan 2011 11:39:57 +0000 |
parents | b7d04eec5e11 |
children | f26dc3f0163d |
files | src/window.cpp |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.cpp +++ b/src/window.cpp @@ -1431,8 +1431,10 @@ { 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 @@ 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) {