summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-04 14:23:54 +0000
committerrubidium <rubidium@openttd.org>2009-12-04 14:23:54 +0000
commitc559ec63088e2d043eb0cf2e17dd23968aaa40b3 (patch)
treeeb5fe68e1a10cefa0c7998a0f94ccabb41b6ceac /src/network
parentc8284c2a5c0825d12bc10c06fa20696d05b45a83 (diff)
downloadopenttd-c559ec63088e2d043eb0cf2e17dd23968aaa40b3.tar.xz
(svn r18397) -Fix [FS#3346]: after cancelling downloading the download button would remain disabled
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content_gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 5d69a21cc..a65544748 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -110,7 +110,6 @@ public:
/* Yes... these are the NewGRF windows */
InvalidateWindowClassesData(WC_SAVELOAD);
InvalidateWindowData(WC_GAME_OPTIONS, 0, 1);
- InvalidateWindowData(WC_NETWORK_WINDOW, 1, 2);
break;
case CONTENT_TYPE_SCENARIO:
@@ -125,6 +124,8 @@ public:
}
}
+ /* Always invalidate the download window; tell it we are going to be gone */
+ InvalidateWindowData(WC_NETWORK_WINDOW, 1, 2);
_network_content_client.RemoveCallback(this);
}
@@ -781,7 +782,8 @@ public:
}
}
- this->SetWidgetDisabledState(NCLWW_DOWNLOAD, this->filesize_sum == 0 || FindWindowById(WC_NETWORK_STATUS_WINDOW, 0) != NULL);
+ /* If data == 2 then the status window caused this OnInvalidate */
+ this->SetWidgetDisabledState(NCLWW_DOWNLOAD, this->filesize_sum == 0 || (FindWindowById(WC_NETWORK_STATUS_WINDOW, 0) != NULL && data != 2));
this->SetWidgetDisabledState(NCLWW_UNSELECT, this->filesize_sum == 0);
this->SetWidgetDisabledState(NCLWW_SELECT_ALL, !show_select_all);
this->SetWidgetDisabledState(NCLWW_SELECT_UPDATE, !show_select_upgrade);