From 8371be352b8e4da1637fb63694ce878bc8a6b342 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 24 Nov 2009 17:13:24 +0000 Subject: (svn r18273) -Codechange: do not require widget numbers for default widgets (close, sticky, resize buttons and the caption), except when you want to use SetStringParameter for the caption ofcourse. Also remove the requirement for some of the WDF flags; no need to test for both the flag whether a feature is used and whether the feature is in action. --- src/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widget.cpp') diff --git a/src/widget.cpp b/src/widget.cpp index cebfefc81..728a95adc 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1693,7 +1693,7 @@ Dimension NWidgetLeaf::closebox_dimension = {0, 0}; */ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip) : NWidgetCore(tp, colour, 1, 1, data, tip) { - assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT); + assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT || tp == WWT_CAPTION || tp == WWT_RESIZEBOX || tp == WWT_STICKYBOX || tp == WWT_CLOSEBOX); if (index >= 0) this->SetIndex(index); this->SetMinimalSize(0, 0); this->SetResize(0, 0); -- cgit v1.2.3-54-g00ecf