diff options
author | yexo <yexo@openttd.org> | 2011-12-09 22:44:06 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-12-09 22:44:06 +0000 |
commit | e31ed7db25dee59cb6df2bacab36a6d77ce400e1 (patch) | |
tree | e2516d9f0b1d22630238b35a23207ef9fa9726f6 /src/network | |
parent | 6153dc57f5ec5f24868703133a0a1295e2e1971f (diff) | |
download | openttd-e31ed7db25dee59cb6df2bacab36a6d77ce400e1.tar.xz |
(svn r23467) -Feature [FS#4827]: automatically close the online content window after confirming the download with 'ok'
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_content_gui.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 05064edb1..740b4bada 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -197,8 +197,14 @@ public: virtual void OnClick(Point pt, int widget, int click_count) { if (widget == NCDSWW_CANCELOK) { - if (this->downloaded_bytes != this->total_bytes) _network_content_client.Close(); - delete this; + if (this->downloaded_bytes != this->total_bytes) { + _network_content_client.Close(); + delete this; + } else { + /* If downloading succeeded, close the online content window. This will close + * the current window as well. */ + DeleteWindowById(WC_NETWORK_WINDOW, 1); + } } } |