summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-23 00:33:15 +0000
committertruelight <truelight@openttd.org>2007-06-23 00:33:15 +0000
commitffd8662fcecd7caf6e4d80b5643682615a4e436d (patch)
treea0f076d2fc50c128ee66ccaf186e4787522a469c /src
parentb1f60c582f0fbc286ff9c2e5a4af15d156016840 (diff)
downloadopenttd-ffd8662fcecd7caf6e4d80b5643682615a4e436d.tar.xz
(svn r10291) -Fix [FS#920]: double click in town-GUI didn't work as expected
Diffstat (limited to 'src')
-rw-r--r--src/town_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 185e17b8a..e4cc8a789 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -184,9 +184,6 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e)
} break;
case WE_DOUBLE_CLICK:
- e->we.click.widget = 6;
- /* Fall through */
-
case WE_CLICK:
switch (e->we.click.widget) {
case 3: { /* listbox */
@@ -200,7 +197,8 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e)
WP(w,def_d).data_1 = y;
SetWindowDirty(w);
}
- break;
+ /* Fall through to clicking in case we are double-clicked */
+ if (e->event != WE_DOUBLE_CLICK || y < 0) break;
}
case 6: { /* carry out the action */