Mercurial > hg > openttd
changeset 14344:eeee36b97cc5 draft
(svn r18899) -Fix: the default button was enabled even when the ENABLE_DEFAULT flag wasn't set
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 23 Jan 2010 19:30:03 +0000 |
parents | 01dc601f440f |
children | f8f20a913bdf |
files | src/misc_gui.cpp |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1252,7 +1252,9 @@ virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) { if (widget == QUERY_STR_WIDGET_DEFAULT && (this->flags & QSF_ENABLE_DEFAULT) == 0) { - this->GetWidget<NWidgetCore>(widget)->SetFill(0, 1); + /* We don't want this widget to show! */ + fill->width = 0; + resize->width = 0; size->width = 0; } }