summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-30 17:42:04 +0000
committerfrosch <frosch@openttd.org>2010-01-30 17:42:04 +0000
commit2f6fe85f23256a116cb4e85606c8714d8fc8a399 (patch)
treedab67c04c97ec285f91ae53a124c36d912f8497f /src
parentaf50e0a4cfd1d6c16801d798705482c92ae93844 (diff)
downloadopenttd-2f6fe85f23256a116cb4e85606c8714d8fc8a399.tar.xz
(svn r18965) -Fix (r17846): Don't compare horizontal positions with vertical.
Diffstat (limited to 'src')
-rw-r--r--src/network/network_content_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index af6bcc9bc..e4209d0e5 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -606,7 +606,8 @@ public:
this->selected = *this->content.Get(id_v);
this->list_pos = id_v;
- if (pt.x <= (int)(this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX)->pos_y + this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX)->current_y)) {
+ const NWidgetBase *checkbox = this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX);
+ if (IsInsideBS(pt.x, checkbox->pos_x, checkbox->current_x)) {
_network_content_client.ToggleSelectedState(this->selected);
this->content.ForceResort();
}