mirror of https://github.com/OpenTTD/OpenTTD
(svn r23467) -Feature [FS#4827]: automatically close the online content window after confirming the download with 'ok'
parent
6153dc57f5
commit
e31ed7db25
|
@ -197,8 +197,14 @@ public:
|
||||||
virtual void OnClick(Point pt, int widget, int click_count)
|
virtual void OnClick(Point pt, int widget, int click_count)
|
||||||
{
|
{
|
||||||
if (widget == NCDSWW_CANCELOK) {
|
if (widget == NCDSWW_CANCELOK) {
|
||||||
if (this->downloaded_bytes != this->total_bytes) _network_content_client.Close();
|
if (this->downloaded_bytes != this->total_bytes) {
|
||||||
delete this;
|
_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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue